juan_gandhi: (VP)
Juan-Carlos Gandhi ([personal profile] juan_gandhi) wrote2014-06-02 04:22 pm
Entry tags:

apple swift

So, with the new "Apple language", object-oriented Java people are going to do what?
There must be some deep philosophy, explaining why they are so retarded.
I think.

I mean, I kind of heard an explanation from Josh; in my translation it sounds like this: "Java programmers are not very smart anyway, let's not overload them with closures and all that stuff."

The correlation I was writing about lately kind of shows itself again.
Weird.

Well, it's not Scala, of course; but it's a nice step in the right direction, I think.

[identity profile] alamar.livejournal.com 2014-06-02 11:36 pm (UTC)(link)
Well, now we've got lambdas, why complain?

I haven't seen apple language but I assume it is an unsafe toy that calls native libraries on every cough? Do not want.
garote: (castlevania library)

[personal profile] garote 2014-06-03 12:01 am (UTC)(link)
Hmm? What do you mean by "unsafe"?

[identity profile] alamar.livejournal.com 2014-06-03 07:16 am (UTC)(link)
I mean that your program may segfault due to error in library or your code, or corrupt data. And that's the end of the show.

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 08:07 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 08:35 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 09:15 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 09:50 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 09:59 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 10:26 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 11:49 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 12:59 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 13:06 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 13:11 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 13:15 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 13:24 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 13:34 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 13:44 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 14:02 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 14:48 (UTC) - Expand

(no subject)

[identity profile] migmit.livejournal.com - 2014-06-03 15:09 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 15:15 (UTC) - Expand

(no subject)

[identity profile] badula.livejournal.com - 2014-06-03 17:54 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-03 21:28 (UTC) - Expand

(no subject)

[identity profile] badula.livejournal.com - 2014-06-04 00:40 (UTC) - Expand

(no subject)

[identity profile] alamar.livejournal.com - 2014-06-04 08:58 (UTC) - Expand

[identity profile] dmytrish.livejournal.com 2014-06-03 12:03 am (UTC)(link)
No, it has borrowed from modern languages surprisingly much (http://www.reddit.com/r/programming/comments/274t5s/apple_swift_programming_language_unveiled/chxgtfh), at the first glance I see a lot of things from Rust: no-nil-values, structured enums like functional ADTs, static compilation, type inference, so underrated C# nullable values (Int?, ?. operator), generics (hi to lame Go!), the right approach to mutability (to ditch it as much as possible or to limit it at least), etc, etc.

In general, languages designed by Apple may often be elitist and highly experimental (Dylan as ThinkDifferentLisp, Objective-C with its strong flavor of Smalltalk, very human AppleScript, etc), so I would not expect Swift to be just another scripting language hacked on top of C run-time.
garote: (bonk)

[personal profile] garote 2014-06-03 12:03 am (UTC)(link)
I was particularly surprised to see closures appear. So far I've only been using them in Javascript and Perl, but my experience has been that they are about 15% added flexibility for about -40% readability. That is, they make it harder to tell what's going on, more than they reduce development time.

[identity profile] dmytrish.livejournal.com 2014-06-03 12:10 am (UTC)(link)
Closures may be not The Comfortable Thing and not the nostrum to be used everywhere, but they're The Right Thing to have because of their theoretical profoundness. SICP explain in depth how to use them to build higher-level primitives.

(no subject)

[personal profile] garote - 2014-06-03 00:15 (UTC) - Expand

[identity profile] vaddimka.livejournal.com 2014-06-03 01:36 am (UTC)(link)
Closures are bad! The Great Oracle forbids it!

[identity profile] fatoff.livejournal.com 2014-06-03 02:45 am (UTC)(link)
Эппль-свифт, то для гурманов. Опять вокруг меня всё эпплем заставлено, ответственно заявляю, пока что у них Обжектив-Си есть краеугольный камень, интенсивно и беспроблемно мешаемым прямо в том же файле с Си-Плас-Плас.

[identity profile] dmytrish.livejournal.com 2014-06-03 09:51 am (UTC)(link)
Ну так выкатили это чудо буквально позавчера.

(no subject)

[identity profile] fatoff.livejournal.com - 2014-06-03 14:40 (UTC) - Expand

(no subject)

[identity profile] dmytrish.livejournal.com - 2014-06-03 14:48 (UTC) - Expand

(no subject)

[identity profile] fatoff.livejournal.com - 2014-06-03 14:55 (UTC) - Expand

(no subject)

[identity profile] dmytrish.livejournal.com - 2014-06-03 15:05 (UTC) - Expand

[identity profile] migmit.livejournal.com 2014-06-03 04:48 am (UTC)(link)
Very interesting. No monads or continuations, which is a shame, but seems to be a decent language anyway.

[identity profile] ivan-gandhi.livejournal.com 2014-06-03 04:47 pm (UTC)(link)
Just the first step; you never know what comes next.

[identity profile] thedeemon.livejournal.com 2014-06-03 05:00 am (UTC)(link)
Swift has classes and inheritance, Java people should feel fine about it.

[identity profile] mikkim08.livejournal.com 2014-06-03 06:07 am (UTC)(link)
I mean, I kind of heard an explanation from Josh; in my translation it sounds like this: "Java programmers are not very smart anyway, let's not overload them with closures and all that stuff."

Допустим. А что означает в данном случае "not very smart" ? Не поймут, что такое closures и не будут их использовать вообще или будут их использовать неправильно, что приведет к дополнительным багам ?

[identity profile] sassa-nf.livejournal.com 2014-06-03 07:07 am (UTC)(link)
думаю, третье: "хер его знает, чем это обернётся!"

[identity profile] ivan-gandhi.livejournal.com 2014-06-03 04:48 pm (UTC)(link)
Мне кажется, он имел в виду второе. Где-то были слайды к его смешному шоу, почему джавщиков надо держать в неведении.

[identity profile] freedom_of_sea.livejournal.com 2014-06-03 06:30 am (UTC)(link)
да кложуры есть те же самые объекты с состоянием внутри. Ты их делаешь (конструктор) и потом вызываешь. Проверив что не нуль. Даже фабрики делают для кложуров. Иногда скажут - гляди вот новое...
А по сути со времен C callbacks ничего новоого и нет. foreach map и grep вот и все что привнесла функциональщина

[identity profile] dmytrish.livejournal.com 2014-06-03 09:53 am (UTC)(link)
Я бы скорее сказал, что классы — это такие усложненные замыкания с сабтайпингом.

[identity profile] dmytrish.livejournal.com 2014-06-03 03:11 pm (UTC)(link)
А по сути со времен ассемблера ничего нового и нет. Там есть и массивы, и указатели на функции, и циклы, и условные переходы, и подпроцедуры, так что ничего кардинально нового в процедурных языках по сравнению с ассемблером нет.

Если серьезно, то дело в другом. Да, объекты в каком-то смысле солянка других понятий, и поэтому всегда можно сказать, что эти понятия не новы (интерфейсы, например — это же просто абстрактный класс без полей, сиплюсплюс епта), но эти понятия намного более ортогональны и проще с точки зрения computer science. А что лучше — система, собранная из многих простых и ортогональных (фундаментальных!) вещей или система, которая состоит из немногих сложных объектов с мало предсказуемым поведеним и побочными эффектами при их взаимодействии?
Edited 2014-06-03 15:12 (UTC)

[identity profile] ivan-gandhi.livejournal.com 2014-06-03 04:49 pm (UTC)(link)
Цитата шибко понравилась; спасибо.

[identity profile] dkfl.livejournal.com 2014-06-03 06:37 am (UTC)(link)
разве это не просто замена AppleScript?

[identity profile] thedeemon.livejournal.com 2014-06-03 06:39 am (UTC)(link)
ํНет, это Objective-C замена.

(no subject)

[identity profile] thedeemon.livejournal.com - 2014-06-04 02:56 (UTC) - Expand

[identity profile] v-l-a-d.livejournal.com 2014-06-03 03:51 pm (UTC)(link)
Почитал сейчас отзывы в твиттере - как ни странно, больше всего непониманий вызвали ситуации вроде этой:


Людям непривычно, что referential transparency и immutability могут быть вполне ортогональны.

lol

[identity profile] oleg prophet (from livejournal.com) 2014-06-03 07:24 pm (UTC)(link)
Since when Scala became such a good language to compare others with it?

[identity profile] thedeemon.livejournal.com 2014-06-04 08:11 am (UTC)(link)
>it's not Scala, of course

Seems pretty close. A comparison (PDF, 15 slides): https://t.co/u6zfzrusFk

[identity profile] ivan-gandhi.livejournal.com 2014-06-04 05:59 pm (UTC)(link)
Я не знаю Дениса, но он зря пропустил такой факт, что в Скале val (a,b) = (1,2) таки есть.

Тема вариантности, тайп лямбда и т.п. не раскрыта.