6 ms·
Congratulations Nim team! :D I've had Nim installed on my laptop for a long time and I've always enjoyed tinkering around with it over the years. Maybe now it'
by nathcd 7y ago
Congratulations Nim team! :D
I've had Nim installed on my laptop for a long time and I've always enjoyed tinkering around with it over the years. Maybe now it's time to find a bigger project to try it out on.
This is a tiny thing, but just to highlight something unique I like about Nim, using `func` to declare pure functions (and `proc` for others) has been a small, but really nice quality of life improvement. It's something I've been wanting in other languages since Nim added it.
It seems like the 2010s have been a pretty amazing time for new programming languages. The ones that I can think of that I've at least tried are Rust, Go, Nim, Crystal, Zig, Pony, Fennel, Janet, and Carp (I know, some of these are pre-2010, but I think they've all either 1.0'd or had a first public release post-2010), and every single one has made me really excited about some aspect of it. I hope this experimentation continues into the 2020s!
- ksec 7y agoAnd it turns out Crystal 0.31 [1] is released! And it is ( or should be ) closing to 1.0 release as well, once Windows Support and MultiThreading matures. May be 2020? On the list of languages I only know the first few up to Zig, will need to check out the others. There is also one noticeable missing and that is Elixir. [1] https://crystal-lang.org/2019/09/23/crystal-0.31.0-released.html https://crystal-lang.org/2019/09/23/crystal-0.31.0-released....
- nathcd 7y agoGood call! Also Julia, Typescript, and ReasonML now that I'm thinking about it.
- phtrivier 7y agoCurious why you're adding Elixir in this list ? It operates is in a completely different space than nim / zig, as far as I know (Not statically checked, heavy but powerful runtime, much "higher level" abstractions, etc...) Not to prevent you from trying it, of course - to each and everyone their own...
- yellowapple 7y agoNot the same person, but I interpreted the preceding comments to be about programming languages in general, not just ones in the same space as Nim and Zig, and would agree that Elixir fits in that broader list.
- TylerE 7y agoI'd say Elixir is certainly a member of list of languages people are considering bailing out of Python for.
- nobleach 7y agoThat's so interesting. I absolutely love Elixir, but I just never saw it as a replacement for Python. (Which I hold in high regards as well) Perhaps it's only my experience with both langs. Elixir I used for JSON API type things, while Python I used for all types of general purpose stuff. Both are great, but Python is super popular with the science crowd (I used it for GIS/Geoprocessing tasks). Maybe Elixir has similar packages and I just never went to look....
- deleted 7y ago[deleted]
- derefr 7y agoThere are a great many people who don't do any heavy maths/sciences data crunching, for whom Python is just their web+scripting language of choice. For those people, "Python" fits in the set of {Perl, Python, Ruby, Node, ...}. Elixir does fit quite comfortably in that set.
- anthony_doan 7y agoYeah... I'm not bailing out Python for Elixir. I use both Python and Elixir. Python for web scraping and Elixir for my side project website. I can see if people want to move web dev from Python to Elixir but yeah not entirely bailing out for Elixir. BEAM VM in general is terrible for numerical stuff. Elixir is pretty niche, it solve one thing concurrency problems. Python is a much more general language.
- ummonk 7y agoI’d add Swift and Julia to that list as well, and arguably Typescript too.
- pletnes 7y agoFortran has had pure functions and subroutines since well before any of the cool languages. Not that I recommend it in particular.
- longemen3000 7y agoIN PARTICULAR,I DO NOT LIKE A PROGRAMMING LANGUAGE SCREAMING AT ME.(well, the last versions seem calmer)
- benj111 7y agoFortran had nearly everything before nearly all languages. And I'm sure Fortran was cool back in the day, I'm sure it's due a comeback any day now.
- ethelward 7y agoAs a matter of fact, in its originally intended domain (i.e. scientific computing), it actually never stopped being a major player.
- mumblemumble 7y agoI've really liked that, too. Its approach to mutability is also very nice. The combined result may not be nearly as principled as the Haskell way of doing controlled mutability with double-checking from the compiler that you aren't breaking your own rules, but it's a nice pragmatic compromise that's easy to understand without having to rewire the way you think about programming.
- Symmetry 7y agoAlso const/let/var declaration keywords for whether something is constant and whether its known at runtime or compile time are also very very friendly.
- giancarlostoro 7y agoD has had this[0] for a bit btw. I think D probably supports every major paradigm. [0]: https://dlang.org/spec/function.html#pure-functions https://dlang.org/spec/function.html#pure-functions
- aasasd 7y agoHot dang, someone knows about Fennel. I'm using a weak-CPU machine these days, and it turns out that everything is slow and cpu-hungry except native code and Lua. Lua blows even JS out. Specifically, my scripts seem to be done faster than Node.js spins up.
- PhilippGille 7y ago"V" would also fit into that list I think. https://vlang.io/ https://vlang.io/
- dvfjsdhgfv 7y agoI was really excited when I saw V for the first time. Then as I was checking the claims one by one it turned out the author was only half honest. That was bad, really bad. I don't feel like visiting this website again and wonder if any of these claims are true or just a kind of strange marketing in order to collect donations.
- GeneralTspoon 7y agoDon’t forget Kotlin, Swift and Typescript! Possibly the most popular 3 of the lot! They don’t break the mould quite like the ones you’ve mentioned, but they’re still a big improvement for day to day stuff!
- ranit 7y ago> ... something unique I like about Nim, using `func` to declare pure functions (and `proc` for others) FORTRAN has this distinction since the beginning.
- gjm11 7y agoI think that's wrong. Isn't Fortran's procedure/function distinction between things that return a value and things that don't, rather than between things without side effects and things that might have side effects? The latter is what Nim's func/proc distinction is about. (Modern Fortran does have a pure keyword meaning "no side effects", but that wasn't there "since the beginning".) [EDITED to add:] I checked in the Fortran 77 standard. The difference between a FUNCTION and a SUBROUTINE is just that the former returns a value and the latter doesn't; in the code for a FUNCTION you are absolutely allowed to do I/O, modify global variables, etc. Functions (and subroutines) can change the values of the variables passed to them. There are also things called "statement functions" which have to have single-line definitions along the lines of "square(x) = x*x"; these don't have to be pure either because the defining expression may call functions that have side-effects.
- littlestymaar 7y ago> using `func` to declare pure functions and `proc` for others What's the limit used by Nim in its definition of a “pure function”? Is function that allocate memory considered a impure one? (technically it is, but it really reduces the usefulness of such keyword if it's too restrictive, that why Rust don't have it for instance).