TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Dada, an experimental new programming language

412 点作者 marionauta大约 1 年前

46 条评论

benrutter大约 1 年前
I love the idea of a &quot;thought experiment language&quot; - actually creating a working language is a big overhead, and its really fun to think about what an ideal language might look like.<p>The crazy thing with reading this and the comments, is that it seems like we all have been daydreaming about completely different versions of a &quot;high level rust&quot; and what that would look like. For me I&#x27;d just want a dynamic run time + simpler types (like &quot;number&quot; or a single string type), but it looks like other people have a completely different list.<p>Some of the additions here, like a gradual type system, I would really <i>not</i> want in a language. I love gradual type system for stuff like Python, Typescript and Elixir, but those are cases where there&#x27;s already so much untyped code written. I would way prefer the guarantees of a fully static typed codebase from day one when that&#x27;s an option.
评论 #39615736 未加载
评论 #39615654 未加载
评论 #39615660 未加载
评论 #39618432 未加载
评论 #39617114 未加载
评论 #39616792 未加载
评论 #39617369 未加载
评论 #39615637 未加载
评论 #39617700 未加载
yamrzou大约 1 年前
Their Hello, Dada! example:<p>print(&quot;...&quot;).await<p>I&#x27;m coming from Python, and I can&#x27;t help but ask: If my goal as a programmer is to simply print to the console, why should I care about the await? This already starts with a non zero complexity and some cognitive load, like the `public static void main` from Java.
评论 #39615661 未加载
评论 #39614927 未加载
评论 #39616329 未加载
评论 #39615938 未加载
评论 #39614946 未加载
评论 #39616967 未加载
评论 #39615090 未加载
评论 #39617904 未加载
评论 #39616188 未加载
评论 #39617514 未加载
评论 #39617040 未加载
happens大约 1 年前
It&#x27;s weird, I want pretty much the exact opposite of this: a language with the expressive type system and syntax of rust, but with a garbage collector and a runtime at the cost performance. Basically go, but with rusts type system.<p>I&#x27;m aware that there are a few languages that come close to this (crystal iirc), but in the end it&#x27;s adoption and the ecosystem that keeps me from using them.
评论 #39615426 未加载
评论 #39615326 未加载
评论 #39615200 未加载
评论 #39616511 未加载
评论 #39615488 未加载
评论 #39615128 未加载
评论 #39615167 未加载
评论 #39617285 未加载
评论 #39616579 未加载
评论 #39616512 未加载
评论 #39622336 未加载
评论 #39615756 未加载
评论 #39617132 未加载
评论 #39616154 未加载
评论 #39615064 未加载
评论 #39615186 未加载
评论 #39615184 未加载
评论 #39616114 未加载
评论 #39617138 未加载
评论 #39615172 未加载
评论 #39615168 未加载
评论 #39615636 未加载
评论 #39615109 未加载
nu11ptr大约 1 年前
I like the idea, but please no &quot;async&#x2F;await&quot;. In a higher level language green threads like Go has are the correct answer IMO (and I&#x27;m not a Go fan, but I feel they got this part right).<p>Gradual typing is interesting, but I wonder if necessary. Static typing doesn&#x27;t have to feel like a burden and could make it hard to reason about performance. I think more type inference would be better than gradually typed (like OCaml&#x2F;ML).
评论 #39617506 未加载
评论 #39616457 未加载
jgilias大约 1 年前
&gt; but one that was meant to feel more like Java or JavaScript<p>Those are two very different feelings though!
评论 #39615798 未加载
mihaic大约 1 年前
I&#x27;ve written a bit of Rust, and I was left with mixed feelings, that seem to be still the same here: - loved the memory safety patterns when compared to the horrible things that you can do with C++ - found almost every thing where it was different to have a harder to parse syntax, that I could never get used to. The implicit return at the end of a statement for instance make it harder for me to visually parse what&#x27;s being returned, since I really depend on that keyword.<p>Code in general is hard for me to mentally read. I know it sounds nitpicky, but to me all keywords should be obviously pronounceable, so something like &quot;func&quot; instead of &quot;fn&quot; would be mandatory. Also, using the permission keywords where I&#x27;d expect the type to be also seems a bit strange, as I&#x27;d imagine that keyword to prefix the variable -- that&#x27;s just how I think though.<p>It does seem like less decorator magic and symbol-based syntax would make it easier for beginners to grasp.<p>I may sound like a curmudgeon, but I&#x27;d prefer only one type of language innovation at a time.
评论 #39616558 未加载
评论 #39616576 未加载
评论 #39616492 未加载
评论 #39616658 未加载
评论 #39616588 未加载
评论 #39617012 未加载
emporas大约 1 年前
The absence of GC, makes embedded Rust a joy. It can be easily attached to other programs like Erlang with NIFs, Javascript and web pages with Web Assembly and Emacs with command line execution. Micro-controllers as well of course.<p>I do consider the lightning start-up speed of a program to be one of the killer features of Rust. Rust with garbage collection throws away one of it&#x27;s biggest advantages compared to every other language around.
评论 #39620914 未加载
评论 #39621468 未加载
评论 #39617665 未加载
brabel大约 1 年前
If the claim that its performance will be similar to Rust&#x27;s if you add type annotations, this could become a really attractive language!<p>As easy as JavaScript to write, as fast as Rust when the extra effort to write it justifies it.
评论 #39615012 未加载
评论 #39614872 未加载
sagebird大约 1 年前
Interesting. The about page starts with a quote from Dada Manifesto 1918. The quote is changed, as explained in a footnote: &quot;Updated to use modern pronouns.&quot;<p>Here is the original quote:<p>I speak only of myself since I do not wish to convince, I have no right to drag others into my river, I oblige no one to follow me and everybody practices his art in his own way, if be knows the joy that rises like arrows to the astral layers, or that other joy that goes down into the mines of corpse-flowers and fertile spasms.<p>changed to :<p>I speak only of myself since I do not wish to convince, I have no right to drag others into my river, I oblige no one to follow me and everybody practices their art their own way.<p>dada-lang about: <a href="https:&#x2F;&#x2F;dada-lang.org&#x2F;docs&#x2F;about&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dada-lang.org&#x2F;docs&#x2F;about&#x2F;</a> Tzara, Dada Manifesto 1918: <a href="https:&#x2F;&#x2F;writing.upenn.edu&#x2F;library&#x2F;Tzara_Dada-Manifesto_1918.pdf" rel="nofollow">https:&#x2F;&#x2F;writing.upenn.edu&#x2F;library&#x2F;Tzara_Dada-Manifesto_1918....</a>
color_me_not大约 1 年前
I don&#x27;t understand the comment in the method print_point in the class Point of the tutorial.<p><pre><code> [...] # This function is declared as `async` because it # awaits the result of print. async fn print_point(p) { # [...] print(&quot;The point is: {p}&quot;).await } [...] </code></pre> From the first page of the tutorial:<p>&gt; Dada, like JavaScript, is based exclusively on async-await. This means that operations that perform I&#x2F;O, like print, don&#x27;t execute immediately. Instead, they return a thunk, which is basically &quot;code waiting to run&quot; (but not running yet). The thunk doesn&#x27;t execute until you await it by using the .await operation.<p>So, what it boils down to is that async&#x2F;await are like lazily computed values (they work a bit like the lazy&#x2F;force keywords in Ocaml for instance, though async seems to be reserved for function declarations). If that is the case, that method &quot;print_point&quot; is forcing the call to print to get that thunk evaluated. Yet, the method itself is marked async, which means that it would be lazily evaluated? Would it be the same to define it as:<p><pre><code> fn print_point(p) { print(&quot;The point is: {p}&quot;) } </code></pre> If not, what is the meaning of the above? Or with various combinations of async&#x2F;await in the signature &amp; body? Are they ill-typed?<p>I wish they&#x27;d provide a more thorough explanation of what await&#x2F;async means here.<p>Or maybe it is a dadaist[0] comment?<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dada" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dada</a>
评论 #39616235 未加载
评论 #39616050 未加载
Doctor_Fegg大约 1 年前
&gt; What if we were making a language like Rust, but one that was meant to feel more like Java or JavaScript, and less like C++?<p>That would be Swift?<p>Interesting experiment. But it does seem like there are increasing numbers of languages trying to crowd into the same spaces.
评论 #39615855 未加载
jokethrowaway大约 1 年前
The main idea is that leases are an easier concept to understand than borrowing and lifetimes?<p>I don&#x27;t think it will be, it sounds like a concept of similar complexity and it won&#x27;t make it an &quot;easy language&quot;.<p>People are scared of Typescript, so a typed language with an extra ownership concept will sound exactly like rust in terms of difficulty.<p>Not that I get the reputation of Rust being hard, even as a complete novice I was able to fight a bit with the compiler and get things working.<p>The gradually typed approach is nice but it just sounds like smarter type inference would get you 99% there while keeping the performance (instead of using runtime checks).<p>Not having unsafe code is both interesting and limiting. I keep all my code safe for my own mental sanity but sometimes having bindings to some big library in c&#x2F;c++ is convenient (eg Qt or OpenCV).
评论 #39617184 未加载
k__大约 1 年前
Reminds me of Dyon, a scripting language for Piston.<p>It&#x27;s dynamically typed and uses lifetimes instead of a garbage collector.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;PistonDevelopers&#x2F;dyon&#x2F;issues&#x2F;173">https:&#x2F;&#x2F;github.com&#x2F;PistonDevelopers&#x2F;dyon&#x2F;issues&#x2F;173</a>
talkingtab大约 1 年前
My opinionated opinion: programming languages have three goals. 1) Be safe, don&#x27;t make mistakes 2) Be expressive: The Sapir Whorf hypothesis 3) Be easy to use.<p>JavaScript (new) is +++2, and ++3 (to me). Java is +++1 &amp; --2, -3.<p>Personally I like OO (&quot;has a&quot;) but think Class-ification,(&quot;is a&quot;) is a big mistake. Take a truck and a car. Start replacing the pieces of the car with pieces from the truck. When is a car not a car? Arbitrary. When does the car have a tail gate, a flat bed?<p>That is not a joke. Classes and Types are a way to think (Sapir Whorf) that makes you do strange things.<p>The interesting thing about Dada is the &quot;borrow&quot;, &quot;share&quot; etc and seems very good. But then instead of wrapping it in a class can&#x27;t we just use an Object?
snarfy大约 1 年前
It&#x27;s a bit frustrating that I have to click around hunting for an example of the syntax.<p>If you are making a new programming language, please do us a favor and put your Hello World syntax example right on the landing page.
评论 #39620042 未加载
bananapub大约 1 年前
what does &quot;creators of rust&quot; mean? Graydon? niko? pcwalton?
评论 #39614901 未加载
评论 #39615928 未加载
pxeger1大约 1 年前
I think there isn&#x27;t enough research into languages with affine&#x2F;linear typing (the property of some types that they can&#x27;t be copied - which is partly what the borrow checker ensures in Rust). I&#x27;m super sold on it for enhancing safety. Vale with its &quot;Higher RAII&quot;[0] is the only other example I was aware of until seeing this.<p>Rust is great but being an early adopter has made its usability imperfect in places. Combining substructural typing with gradual typing and OOP is interesting here. Others in this thread have also mentioned wanting a higher-level Rust, like Go. I&#x27;d like to see a purely functional Rust. Haskell has experimental support for linear typing[1], but I suspect a language built with it from the ground up would be very different.<p>[0]: <a href="https:&#x2F;&#x2F;verdagon.dev&#x2F;blog&#x2F;higher-raii-7drl" rel="nofollow">https:&#x2F;&#x2F;verdagon.dev&#x2F;blog&#x2F;higher-raii-7drl</a><p>[1]: <a href="https:&#x2F;&#x2F;ghc.gitlab.haskell.org&#x2F;ghc&#x2F;doc&#x2F;users_guide&#x2F;exts&#x2F;linear_types.html" rel="nofollow">https:&#x2F;&#x2F;ghc.gitlab.haskell.org&#x2F;ghc&#x2F;doc&#x2F;users_guide&#x2F;exts&#x2F;line...</a>
评论 #39617104 未加载
luke-stanley大约 1 年前
I was posting that &quot;a_print&quot; (an auto running async printer) might be better for one of the most common features a programmer uses.<p>I&#x27;m coming from Python, and for situations when people grasp for C&#x2F;++ kind of performance and control, I think people are aware of the need for high performance memory safe languages that are easier to use than Rust but with many of Rust&#x27;s benefits being at least possible. So I am quite excited by thinking from Dada and the people who are behind Rust and I&#x27;m also intrigued by SerenityOS&#x27;s Jakt language project. I hope the insecure &quot;C code problem&quot; has a smooth migration path that let&#x27;s C&#x2F;++ devs, Typescript devs, and others make progress quickly in a powerful way. What other sort of alternative languages are there, among Dada&#x27;s aspirations? Jakt? Vale (I understand a lead dev is poorly, so it&#x27;s slowed a bit lately)? D? Go? Obviously AI will have a big impact. What language is going to have a big impact in this space?
hgs3大约 1 年前
I&#x27;ve dabbled in PL research before, and not to downplay the work as this is just my opinion, but the Rust ownership system is too invasive. It prevents entire classes of architectures and algorithms from being directly represented without auxiliary structures and other code contortions. I don&#x27;t think it is an approach that should be mimicked.
评论 #39619603 未加载
Alifatisk大约 1 年前
Why the name and the logo? Couldn&#x27;t find info about it.<p>Otherwise, the idea of creating something close to rust but without the complexity sounds interesting. I just hope they don&#x27;t stick to that name.
评论 #39614956 未加载
评论 #39615428 未加载
评论 #39617268 未加载
librasteve大约 1 年前
++ that gradual types are included … Rust does an awesome job of the contract you want with your compiler is enforce types strongly for maximum safety, but this is not always the appropriate trade off for small projects … i prefer a language with a sliding scale where i can grow a codebase and be more strict if and when it becomes more mission critical (gradual typing is the answer for this imo and is well done in eg rakulang)
jamsterion大约 1 年前
Dada looks &quot;almost&quot; great! I especially like that it targets wasm; I believe wasm is the future of frontend and also backend with wasi. However, I believe that being gradually typed is a mistake. Dart started being optionally typed and then they made it fully statically typed for very good reasons. I hope they learn from Dart&#x27;s experience there.
kkukshtel大约 1 年前
Feel like there would be fewer posts and languages like this if people just took 10 seconds to read about modern C#.
评论 #39622305 未加载
couchand大约 1 年前
&gt; As of right now, Dada doesn&#x27;t really exist, though we have some experimental prototypes...<p>&gt; OK, from here on out I&#x27;m going to pretend that Dada really exists in its full glory.<p>This is a brilliant trick I only recently discovered in another context: write the docs first, to validate the user experience of a novel system.
评论 #39615641 未加载
stephen大约 1 年前
If you&#x27;re cloning parts of TypeScript, please bring along mapped &amp; conditional types!<p>Feel free to experiment on the syntax, but the concept is amazing, especially if you&#x27;re planning on being dynamic-ish.
dist-epoch大约 1 年前
&gt; Dada is object-oriented, though not in a purist way<p>Are classes cool again?
评论 #39615600 未加载
sn9大约 1 年前
This might be a naive question, but rather than targeting WASM directly, why not target MLIR (used by projects like Mojo) and use LLVM to compile to WASM?
zubairq大约 1 年前
Amazing way to test if a new computer language is viable! I think that more people (including myself) should take this approach to language design.
brakmic大约 1 年前
Dada: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dada" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dada</a>
评论 #39615309 未加载
helothereycomb大约 1 年前
<a href="https:&#x2F;&#x2F;antelang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;antelang.org&#x2F;</a>
bmitc大约 1 年前
I thought the creators of Rust were <i>creator</i>, singular, in Graydon Hoare. Are they involved with this?
评论 #39625418 未加载
评论 #39617699 未加载
评论 #39617310 未加载
imjonse大约 1 年前
Not new, launched in 2021 apparently.
greenie_beans大约 1 年前
love this quote<p>&gt; I speak only of myself since I do not wish to convince, I have no right to drag others into my river, I oblige no one to follow me and everybody practices their art their own way.<p>&gt; Tristan Tzara, &quot;Dada Manifesto 1918”
BobbyTables2大约 1 年前
Sounds a bit like Python but with actual &amp; optional runtime type checking?
ubj大约 1 年前
Interesting, but the intent seems similar to Chris Lattner&#x27;s new Mojo language which arguably has similar characteristics and is further along in its development.<p><a href="https:&#x2F;&#x2F;docs.modular.com&#x2F;mojo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.modular.com&#x2F;mojo&#x2F;</a>
p0w3n3d大约 1 年前
It sounds like mockups to create a programming language
melodyogonna大约 1 年前
Mojo but for Javascript
Georgelemental大约 1 年前
See also Graydon Hoare&#x27;s Rust-that-could-have-been: <a href="https:&#x2F;&#x2F;graydon2.dreamwidth.org&#x2F;307291.html" rel="nofollow">https:&#x2F;&#x2F;graydon2.dreamwidth.org&#x2F;307291.html</a>
actionfromafar大约 1 年前
What is Dada?
评论 #39615633 未加载
VMG大约 1 年前
the contrast of the links against the light background is pretty poor
评论 #39616809 未加载
Rucadi大约 1 年前
no upfront types, for me this is unusable sadly
评论 #39615751 未加载
评论 #39615024 未加载
sorenjan大约 1 年前
Changing a quote to change &quot;his&quot; to &quot;theirs&quot; seem like a very Rust community thing to do.<p>&gt; Updated to use modern pronouns.<p><a href="https:&#x2F;&#x2F;dada-lang.org&#x2F;docs&#x2F;about&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dada-lang.org&#x2F;docs&#x2F;about&#x2F;</a>
评论 #39616341 未加载
评论 #39616348 未加载
评论 #39616340 未加载
评论 #39616610 未加载
评论 #39617439 未加载
评论 #39616216 未加载
评论 #39616336 未加载
评论 #39617671 未加载
评论 #39621479 未加载
评论 #39616807 未加载
评论 #39616438 未加载
评论 #39617417 未加载
评论 #39616332 未加载
richrichie大约 1 年前
It was only a matter of time before even the creators of Rust grew tired of it being another C++.
owenbrown大约 1 年前
Every time I see a new language, I immediately check if it uses significant white space like Python. If it doesn’t, I sigh sadly and dismiss it.
评论 #39617046 未加载
评论 #39617178 未加载
评论 #39616613 未加载
alphazard大约 1 年前
Just so everyone knows. Graydon is not in the list of contributors on GitHub.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dada-lang&#x2F;dada&#x2F;graphs&#x2F;contributors">https:&#x2F;&#x2F;github.com&#x2F;dada-lang&#x2F;dada&#x2F;graphs&#x2F;contributors</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;graydon">https:&#x2F;&#x2F;github.com&#x2F;graydon</a>
udev4096大约 1 年前
Not this again. How many languages do we need? I am having a good time with Go and Python!