6 ms·
The examples on the home page are a nice way to quickly show the features of a language. I'll check the documentation to see how to work with files, make HTTP c
by pmontra 2y ago
The examples on the home page are a nice way to quickly show the features of a language. I'll check the documentation to see how to work with files, make HTTP calls, parse JSON.
It's the first time in more than 10 years that I actually feel like trying a new language. The last time was Elixir. Since then I had to use Lua (hobby project) and Python (work) but I don't enjoy them much. I would have skipped them if I hadn't have to use them. Before Elixir I enjoyed Ruby, before that it's been Perl 5 in the 90s. Everything else I used in that period and before was because I had to (C, Java, PHP, JavaScript/Node) and I skipped many other mainstream languages because they didn't look nice to work with (Go, Rust, TypeScript.) I still have to see what's writing and running a Rhombus programs looks like so I might discover that it's not so nice after all. I'm hopeful.
- timkq 2y agoTypeScript & Rust don't "look nice to work with" because they force you to write maintainable code that doesn't just stop working because of a random runtime error. In my opinion, Go looks nice to work with but actually is a hidden monster full of footguns.
- kalekold 2y ago> Go looks nice to work with but actually is a hidden monster full of footguns. Really? Me and my team been using it for years with no problems whatsoever.
- freeopinion 2y agoDo you feel the same way about English?
- tgv 2y agoWhile Typescript has the gaping hole that is typing external data. Your code can't enforce that in TS, but in Go you're forced to. I do admit Go has an easily found foot gun: nil pointers. It's a small one though, in comparison to the original problems with nil pointers. More stubbing your toe than shooting your foot.
- hnlmorg 2y agoCurious to read that because I’ve always had the opposite opinion of the above: Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS). Go looks horrible to work with (too simplified syntax) but is actually really nice because the tooling is (mostly) spot on and it’s simplified syntax weirdly helps with maintainability for large projects that have evolved over multiple years. I guess this just goes to show how much personal preference can be a driving force behind our platforms of choice.
- frontfor 2y agoI’m not sure about Go being full of footguns, but for one, a panic in any goroutine forcibly terminates the entire application.
- noisy_boy 2y agoThe constant incantation of if err != nil is bad for my aging hands and frankly hurts even more when you see Rust's single-character error marshalling using ? operator.
- shikck200 2y agoI have aliases for these kinds of general things (in vim) for most languages i use. Eg. if im inside a typescript file i have a mapping produces if ($obj) { $ } and i tab to enter the next "$" to insert the correct things. The same goes fo Go. I have a mapping for if err != nil { ... } and the cursor is places inside the block. I dont understand why people dont use this kind of thing for the most common programming constructs.
- noisy_boy 2y agoI would suppose they do and are free to do it - however, liberally having to spread it all over the code hurts readability. I'm sure people can say in response to that after a while you stop noticing or that their favorite IDE can collapse it and so on. It can be excuses all the way down instead of admitting that it is a shortcoming of the language.
- alpaca128 2y agoTechnically TypeScript doesn’t force you to anything other than writing valid JS code. Its design was great for wide adoption but also suffers from the JS part.
- a2800276 2y agoExactly, Typescript doesn't stop working because of random runtime errors, it stops working because you didn't update the toolchain tangle last Thursday and then some configuration file got out of whack with the tsc defaults ;-)
- pjmlp 2y agoTypescript is like C++ and Objective-C for C. Technically, it provides an improved type system that offers the tooling to write safer code. In practice, plenty of folks just rename the file extension and keep coding as they always did.
- cies 2y agoI found Kotlin a "typed Ruby" (I found Ruby a "sane Perl"). Rust seems pretty nice to work with (good DX) in it's domain: close to the metal programs were every tick counts. The main DX issue with it would be compile times. Go's awful to me from a DX perspective as it is lacks proper error handling. Compile times are great though. Maybe OCaml is a good fit for me (and you!). Fast compile times and good error handling. TypeScript suffers too much from being a JS superset. JS has horrendous DX imho.
- dominicrose 2y agoInteresting. I learned Ruby a long time ago because a Perl expert told me Ruby was getting good. I like Typescript because it's really easy to read and maintain without breaking anything. But you can't do this: `next x.map { _1 + 3 }.sum if sth`. I guess I should give Kotlin a try then.
- pmontra 2y agoAfter 20 years of Ruby I didn't know (or didn't remember) that next can have an argument. I looked it up. Thanks. BTW, I never liked the _N arguments. Too cryptic. They make me stop and think on details instead of just read the code and concentrate on the important stuff. x.map {¦n¦ n + 3}.sum is immediately clear but I guess that it's very subjective.
- phiiiillll 2y agoIn 3.4 you can now do x.map { it + 3 }.sum which I'm still getting used to
- gus_massa 2y agoFrom Rhombus you can call all the Racket libraries. I used Racket in a few projects: * To edit a Moodle backup file, I used Racket to unzip it, find the xml file, parse and filter some of the parts of the xml file and then zip the new version. * To autoreply some emails, I used IMAP, then scrap some info from my webpage and then SMTP. There is also a JSON library, but I never used it. The only problem is that some libraries have no wrappers still, so instead of the expected snake_case name you must use the spear-case with some delimiter to make the parser happy. (Something like |spear-case| or {spear-case}, I should check the docs.) And if that annoys you too much, it's easy to write a macro with a rename transformer so you can use the nice snake_case name, it adds a negligible compilation time and no penalty at run time.
- sevensor 2y agoI was skeptical when I heard “Python-like Racket syntax,” but this certainly looks like the Python I wish I was writing. Edit: racket is a nice language, went my thinking, why give it a Python syntax? But I think they’ve answered that.
- mapcars 2y agoYou ever heard of Crystal, Red, XL?