Hacker News new | ask | show | jobs
by tmtvl 1125 days ago
I would like Rust a lot more if it got rid of methods. Instead of writing something like...

  args.into_iter().skip(1).and_so_on...
Which I can't stand to look at, I'd vastly prefer something like...

  for arg in args[1..*] { ... }
Though my true preference would be S-expressions, but I realise that people lose their marbles when they see something like...

  (for-each do-something
    (slice args #:from 1))
Of course Common Lisp is one of the faster slow-as-molasses languages, but having a language that uses S-expressions which can compile down into a small, fast binary would be the dream. Carp would be interesting if it didn't use Clojure syntax.
2 comments

Slow as molases? I will assume you have actually written quite a bit in it since you seem to like s-expressions and I really can't think of any other language other than lisps that use them.

With that in mind, what other lisps are running circles against common-lisp? I would love to give those languages a try. From my experience sbcl common-lisp is about equal to Go and Java which I consider pretty fast languages.

Its not as fast as C,C++,Rust but when I think of slow I think of Python, not lisps.

> With that in mind, what other lisps are running circles against common-lisp?

Well, I haven't tried any of the Linear Lisps, but as far as I know it's the fastest Lisp. That said, well-written C or Fortran will run circles around it.

> From my experience sbcl common-lisp is about equal to Go and Java which I consider pretty fast languages.

SBCL is amazing, it's really fast (though LW beats it in certain situations), but it's in the same class as Go and Java, which I consider dog slow. Modern computers are really, really, stupendously, ludicrously fast; but many programming languages don't give our computers a chance to really shine, which is a shame.

Basically it's like... an F1 car is really fast as long as you don't compare it to a fighter jet.

You can write almost exactly what you wrote, if you prefer

    fn main() {
        let args = vec![1, 2, 3, 4, 5];
        
        for arg in &args[1..] {
            println!("{arg}");
        }
    }