News for hackers. Stuff that matters.
Re:A Look at Crystal, the Programming Language for Humans by varjag on Friday May 05, 2023 @04:48AM (#35826793)
There are two types of modern programming languages: those that look like C and those that look like Python.
Re:A Look at Crystal, the Programming Language for Humans by sph on Friday May 05, 2023 @05:01AM (#35826870)
(concat '(c python) lisp-derived-languages)

Also add Forth, Prolog, Brainfuck, Haskell/ML and Ruby. There's more to programming than you think.

Re:A Look at Crystal, the Programming Language for Humans by varjag on Friday May 05, 2023 @05:14AM (#35826941)
I meant the syntax of novelty languages we have on HN regularly.

And Ruby is Python-mimicry open your eyes.

Re:A Look at Crystal, the Programming Language for Humans by segfaltnh on Friday May 05, 2023 @07:23AM (#35827822)
Didn't ruby and python both get created in the same year...?
Re:A Look at Crystal, the Programming Language for Humans by cristoperb on Friday May 05, 2023 @10:11AM (#35829459)
Python was released earlier than Ruby (1991 vs 1993/1995), and Matz was familiar with it. But Ruby is clearly an attempt at an object-oriented Perl rather than a Python mimic:

> I knew Python then. But I didn't like it, because I didn't think it was a true object-oriented language---OO features appeared to be add-on to the language. As a language manic and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for, but couldn't find one.

https://ruby-doc.org/docs/ruby-doc-bundle/FAQ/FAQ.html

Re:A Look at Crystal, the Programming Language for Humans by chaxor on Friday May 05, 2023 @03:22PM (#35833984)
"OO features appeared to be add-on"

No one tell them about the horrors of R. That's a 'yikes' of a language that no one should ever use.

Re:A Look at Crystal, the Programming Language for Humans by tmtvl on Friday May 05, 2023 @07:24AM (#35827833)
Don't forget APL.
Re:A Look at Crystal, the Programming Language for Humans by varjag on Friday May 05, 2023 @10:38AM (#35829804)
Right, because we see so many APL derived languages lately.
Re:A Look at Crystal, the Programming Language for Humans by lkschubert8 on Friday May 05, 2023 @04:52AM (#35826827)
+ Those that look like ruby?
Re:A Look at Crystal, the Programming Language for Humans by quickthrower2 on Friday May 05, 2023 @05:18AM (#35826963)
Ruby looks like Python
Re:A Look at Crystal, the Programming Language for Humans by d3ckard on Friday May 05, 2023 @05:48AM (#35827092)
It does not. No language with statements is like Ruby.
Re:A Look at Crystal, the Programming Language for Humans by pjmlp on Friday May 05, 2023 @07:34AM (#35827920)
If anything, Ruby looks like Smalltalk without image file.
Re:A Look at Crystal, the Programming Language for Humans by pjmlp on Friday May 05, 2023 @07:34AM (#35827912)
You forgot those that look like Pascal and those that look like ML.
Re:A Look at Crystal, the Programming Language for Humans by varjag on Friday May 05, 2023 @10:44AM (#35829872)
Hadn't seen := in a new language in a while tho.
Re:A Look at Crystal, the Programming Language for Humans by poo-yie on Friday May 05, 2023 @01:42PM (#35832648)
go has it. it's not brand new, but relatively new.
Re:A Look at Crystal, the Programming Language for Humans by pjmlp on Friday May 05, 2023 @02:50PM (#35833602)
Walrus operator in Python.
Re:A Look at Crystal, the Programming Language for Humans by qwertfisch on Wednesday May 10, 2023 @06:06AM (#35885527)
Except that the walrus operator “:=” is an assignment expression, whereas in Pascal it is an assignment statement, like “=” in many languages. In Pascal, the boolean comparison operator is “=” instead of “==” (in the same many languages).

And there is C where the assignment expression is just “=”, there is no assignment statement, and many forgotten double equals led to bugs …

Re:A Look at Crystal, the Programming Language for Humans by dw-im-here on Friday May 05, 2023 @08:21AM (#35828303)
You mean there are two modern programming languages which you know
Re:A Look at Crystal, the Programming Language for Humans by varjag on Friday May 05, 2023 @10:38AM (#35829808)
Read what I say, not what you mean.
Re:A Look at Crystal, the Programming Language for Humans by dym_sh on Friday May 05, 2023 @09:41AM (#35829067)
someone discovered whitespace significance but doesnt know how to call it yet