4 ms·
Over the years I have learned and dipped my toes in many programming languages, and I'd need some kind of reason to look into yet another language. What are Rak
by msvan 6y ago
Over the years I have learned and dipped my toes in many programming languages, and I'd need some kind of reason to look into yet another language. What are Raku's main contributions to the programming language design space that I probably haven't seen elsewhere?
- sigzero 6y agoMaybe grammars? You'd have to research. https://docs.raku.org/language/grammars https://docs.raku.org/language/grammars
- tsjq 6y agoIt is Perl
- deleted 6y ago[deleted]
- cutler 6y agoHyperoperators by The Damian.
- jinpa_zangpo 6y agoRational numbers instead of floating point as the default real type.
- db48x 6y agoThat's not exactly a new innovation though; Lisp has had a whole numeric tower for a few decades now…
- raiph 6y agoI was taught in school that `0.1` is rational. Afaik it isn't in any lisps. I think that's the point the GP was making. That said, while making `0.1 + 0.2 - 0.3` come out as exactly zero, with a clean and principled way to avoid things going pathological when the denominator gets large, is nice, it's hardly one of Raku's "main contributions to the programming language design space that I probably haven't seen elsewhere?"! :)
- donaldihunter 6y agoGradual / optional type declaration, grammars as a first class language feature, async / parallel programming, rational numbers, lazy evaluation, OOP with classes and roles and an underlying metaobject protocol.
- olah_1 6y agoThe real bummer about optional typing is that it doesn’t speed up the program. I used it all over thinking that I was “optimizing” or helping the compiler. Really I was creating more work for it.
- donaldihunter 6y agoThe goal is definitely that it can enable greater optimisation and I agree that it's not a reality yet. The other benefit is that it constrains types so that you get compile time type checking, which is very useful.
- p6steve 6y agotyping, roles/inheritance and multi dispatch together offer a very clean coding model that cuts through the usual if-then-else wool
- anewaccount2021 6y agoRaku incorporates many of the neatest ideas in languages but retains a perlish flavor. I would almost equate it with Racket, in that there is support for many styles of coding, and your code may look nothing like another's. TMTOWTDI is fundamental to the perl philosophy so if you prefer total consistency, you are probably better off with python or go.
- zem 6y agophasers are very neat https://docs.raku.org/language/phasers https://docs.raku.org/language/phasers
- p6steve 6y agogreat question @msvan - raku has many ... for me the unique genius of raku is to have stolen all of the best parts of type system, OO, grammars & regex, functional and procedural coding and jammed them into one smoothly integrated syntax
- raiph 6y agoIt's core concept cake (like a "concrete turing machine model" counterpart to lisp 1.5's half page of lambda calculus definition) combined with the mutable braid of mutable PLs icing.[0] [0] https://gist.github.com/raiph/849a4a9d8875542fb86df2b2eda89296 https://gist.github.com/raiph/849a4a9d8875542fb86df2b2eda892...