apple swift

Jun. 2nd, 2014 04:22 pm
juan_gandhi: (VP)
[personal profile] juan_gandhi
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.

Date: 2014-06-02 11:36 pm (UTC)
From: [identity profile] alamar.livejournal.com
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.

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

Date: 2014-06-03 07:16 am (UTC)
From: [identity profile] alamar.livejournal.com
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)

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

(no subject)

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

(no subject)

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

(no subject)

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

(no subject)

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

(no subject)

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

(no subject)

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

(no subject)

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

(no subject)

From: [identity profile] migmit.livejournal.com - Date: 2014-06-03 01:06 pm (UTC) - Expand

(no subject)

From: [identity profile] alamar.livejournal.com - Date: 2014-06-03 01:11 pm (UTC) - Expand

(no subject)

From: [identity profile] migmit.livejournal.com - Date: 2014-06-03 01:15 pm (UTC) - Expand

(no subject)

From: [identity profile] alamar.livejournal.com - Date: 2014-06-03 01:24 pm (UTC) - Expand

(no subject)

From: [identity profile] migmit.livejournal.com - Date: 2014-06-03 01:34 pm (UTC) - Expand

(no subject)

From: [identity profile] alamar.livejournal.com - Date: 2014-06-03 01:44 pm (UTC) - Expand

(no subject)

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

(no subject)

From: [identity profile] alamar.livejournal.com - Date: 2014-06-03 02:48 pm (UTC) - Expand

(no subject)

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

(no subject)

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

(no subject)

From: [identity profile] badula.livejournal.com - Date: 2014-06-03 05:54 pm (UTC) - Expand

(no subject)

From: [identity profile] alamar.livejournal.com - Date: 2014-06-03 09:28 pm (UTC) - Expand

(no subject)

From: [identity profile] badula.livejournal.com - Date: 2014-06-04 12:40 am (UTC) - Expand

(no subject)

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

Date: 2014-06-03 12:03 am (UTC)
From: [identity profile] dmytrish.livejournal.com
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.

Date: 2014-06-03 12:03 am (UTC)
garote: (bonk)
From: [personal profile] garote
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.

Date: 2014-06-03 12:10 am (UTC)
From: [identity profile] dmytrish.livejournal.com
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)

From: [personal profile] garote - Date: 2014-06-03 12:15 am (UTC) - Expand

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

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

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

(no subject)

From: [identity profile] fatoff.livejournal.com - Date: 2014-06-03 02:40 pm (UTC) - Expand

(no subject)

From: [identity profile] dmytrish.livejournal.com - Date: 2014-06-03 02:48 pm (UTC) - Expand

(no subject)

From: [identity profile] fatoff.livejournal.com - Date: 2014-06-03 02:55 pm (UTC) - Expand

(no subject)

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

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

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

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

Date: 2014-06-03 06:07 am (UTC)
From: [identity profile] mikkim08.livejournal.com
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 и не будут их использовать вообще или будут их использовать неправильно, что приведет к дополнительным багам ?

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

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

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

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

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

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

(no subject)

From: [identity profile] freedom_of_sea.livejournal.com - Date: 2014-06-03 07:24 pm (UTC) - Expand

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

(no subject)

From: [identity profile] freedom_of_sea.livejournal.com - Date: 2014-06-03 07:27 pm (UTC) - Expand

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

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

(no subject)

From: [identity profile] freedom_of_sea.livejournal.com - Date: 2014-06-03 07:29 pm (UTC) - Expand

(no subject)

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

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


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

lol

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

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

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

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

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

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
222324252627 28
29 30     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 5th, 2025 09:05 am
Powered by Dreamwidth Studios