this post was submitted on 08 Jan 2025
25 points (96.3% liked)

Rust

6187 readers
87 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

cross-posted from: https://programming.dev/post/23822190

I added this language to my watch list some time ago and forgot about it, until I got a notification about a new release (0.15) yesterday.

I'm someone who is familiar with system languages (C, Rust) and shell languages (Bash, Zsh, ..). But don't have much experience, at a proficient level, with any languages setting in between.

So I gave Koto's language guide a read, and found it to be very well-written, and the premise of the language in general to be interesting. I only got annoyed near the end when I got to @base, because I'm an anti-OOP diehard ๐Ÿ˜‰

I hope this one well start to enjoy some adoption.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 5 points 22 hours ago (1 children)
print 'Hello, World!'
# -> Hello, World!

square = |n| n * n
'8 squared is {square 8}'
# -> 8 squared is 64

(2, 4, 6, 8)
  .each square
  .to_list()
# -> [4, 16, 36, 64]

it might be just me, but, from the code snippet, it feels a lot like ruby

[โ€“] [email protected] 2 points 21 hours ago

As someone who doesn't know scripting languages well, what does make the snippet you posted particularly Ruby-ish?

Reading the guide, it felt like a relatively small consistent scripting language, with some Rustic touches. But I probably missed the touches from other languages I don't know.

But then, Rust itself took inspiration from many other languages, including Ruby itself. So, maybe everyone is taking from (or mimicking if you will) everyone.

BTW, that last part can be written as*:

# from iterator import each, to_list
ยป square -> each (2,4,6,8) -> to_list
โž [4, 16, 36, 64]

which maybe mimics some other functional or functional-influenced language(s).


* may require 0.15.1