> On May 15, 2015, at 4:34 AM, has <hengist.p...@virgin.net> wrote:
> 
> Lisp has a `nil` object. That's not the same thing as a nil pointer. The 
> first is an actual Thing; the second is a promise to give you a thing that 
> instead drops you down a hole when you actually ask for it.

Yes, but when you evaluate (cdr nil) doesn’t the interpreter trigger an 
exception? (Sorry, it’s been decades since I used LISP.) Similarly, in 
Smalltalk-80 ‘null’ is a real object, a singleton of class UndefinedObject, but 
trying to message it is going to raise a message-not-handled exception. The 
difference from a nil pointer is mostly that you get a language-level rather 
than an OS-level exception.

> I *really* wish Swift designers had copied FP's elegant type declaration and 
> pattern matching syntax, instead of godawful C++ hideousness. It's so much 
> cleaner it isn't funny.

I said similar things when Java first came out — “it’s a whole new language! 
Why did they have to copy the awful C syntax?” — but from a pragmatic 
standpoint I was wrong. A big part of the reason Java took off was that it 
looked familiar to C and C++ programmers. A language with an awesome syntax is 
still a failure if people won’t adopt it. (Of course you can take that too far 
end end up with miserable pidgins like PHP…) For better or worse, all* of the 
languages I know of in the new Modern Systems Programming category (Go, Rust, 
Swift, …) have a surface-level similarity to C.

—Jens

* Oops, Nim doesn't. But Nim also doesn’t seem to have as much traction, which 
bolsters my point.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to