metaclass: (Default)
metaclass ([personal profile] metaclass) wrote2012-06-17 01:33 pm

Крестики же.

Вот жеж страуструпъ намутил, блин.
const/не-const
указатель/ссылка/значение
куча/стек
(deleted comment)

[identity profile] vp.livejournal.com 2012-06-17 11:20 am (UTC)(link)
капец. Вообще за такое надо бить канделябром, до смерти.

[identity profile] gds.livejournal.com 2012-06-17 01:23 pm (UTC)(link)
за использование C++? Надо!

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 13:32 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 13:41 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:15 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 14:25 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:54 (UTC) - Expand

(no subject)

[personal profile] alll - 2012-06-17 15:15 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 17:19 (UTC) - Expand

(no subject)

[personal profile] alll - 2012-06-17 18:13 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 18:48 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:08 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 19:15 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:22 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 19:28 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:30 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 19:40 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-17 19:41 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:50 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 04:28 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-18 04:33 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 05:04 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-18 05:07 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:14 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 14:25 (UTC) - Expand

[identity profile] vaddimka.livejournal.com 2012-06-17 03:58 pm (UTC)(link)
почему? если они делают разное - таки да
а если просто например геттер, у константного объекта он возвращает константный объект, у неконстантного - неконстантный
все нормально. или getFooConst() лучше бы смотрелось?

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 17:20 (UTC) - Expand

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-17 17:44 (UTC) - Expand

(no subject)

[identity profile] vaddimka.livejournal.com - 2012-06-17 18:04 (UTC) - Expand

[identity profile] guamoka.livejournal.com 2012-06-17 07:07 pm (UTC)(link)
ребе. с const все очень просто: его надо использовать с фанатизмом, либо не использовать вовсе. такой даётся совет юным подаванам. сидетьНаСтуле(const Стул(ПривинченныйКПолу)& c) const сидетьНа(Простом)Стуле((ПростоРаскладной)Стул& c).
Edited 2012-06-17 19:08 (UTC)

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-17 19:37 (UTC) - Expand

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-18 09:43 (UTC) - Expand

[identity profile] zamotivator.livejournal.com 2012-06-20 10:23 am (UTC)(link)
Наоборот это охуенно, понятно что read-only, а что может быть изменено

(no subject)

[identity profile] vp.livejournal.com - 2012-06-20 10:25 (UTC) - Expand

(no subject)

[identity profile] zamotivator.livejournal.com - 2012-06-20 10:25 (UTC) - Expand

(no subject)

[identity profile] vp.livejournal.com - 2012-06-20 10:27 (UTC) - Expand

(no subject)

[identity profile] zamotivator.livejournal.com - 2012-06-20 10:28 (UTC) - Expand

(no subject)

[identity profile] vp.livejournal.com - 2012-06-20 10:31 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-20 10:35 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-21 08:51 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-20 10:31 (UTC) - Expand

(no subject)

[identity profile] zamotivator.livejournal.com - 2012-06-20 10:31 (UTC) - Expand

[identity profile] dmi3s.blogspot.com (from livejournal.com) 2012-06-17 11:33 am (UTC)(link)
Все немного веселее. http://ideone.com/nQj0p (http://ideone.com/nQj0p)

[identity profile] nicka-startcev.livejournal.com 2012-06-17 11:21 am (UTC)(link)
так ассемблер же. квазивысокоуровневый, но ассемблер.

[identity profile] metaclass.livejournal.com 2012-06-17 11:27 am (UTC)(link)
Это ANSI C ассемблер. А С++ это анальный ад и перл.

[identity profile] nicka-startcev.livejournal.com 2012-06-17 11:46 am (UTC)(link)
С - это ассемблер
с++ - это макроассемблер.
то есть, С++ - это С, но с небольшими улучшайзингами типа чуть лучшей проверки типов и перегрузки всего, что шевелится.

хотя, какой-нибудь FILE* к HANDLE* или к обычному указателю молча приводится и там и там. Буль и энум к интам вроде бы тоже.

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 12:00 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 12:13 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 13:20 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 13:31 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 14:27 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 15:16 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 15:53 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:23 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 19:26 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:51 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 21:03 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 12:08 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 13:22 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:18 (UTC) - Expand

(no subject)

[identity profile] bitfield.livejournal.com - 2012-06-17 19:30 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-17 12:41 (UTC) - Expand

(no subject)

[personal profile] alll - 2012-06-17 15:18 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-17 19:10 (UTC) - Expand

(no subject)

[personal profile] alll - 2012-06-17 19:57 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-17 20:53 (UTC) - Expand

(no subject)

[identity profile] kkirsanov.livejournal.com - 2012-06-17 12:43 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:22 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-17 14:53 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:12 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 04:35 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 09:36 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-17 15:53 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 04:35 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 04:39 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-18 10:33 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-18 10:34 (UTC) - Expand

[identity profile] gds.livejournal.com 2012-06-17 01:20 pm (UTC)(link)
(побояню) Для некоторых применений ANSI C хуже ассемблера!

[identity profile] red1ynx.livejournal.com 2012-06-17 12:31 pm (UTC)(link)
Ага, вот наглядное сравнение сложности: www.cpprocks.com/cpp-ruby-coffeescript-language-complexity/

[identity profile] yantayga.livejournal.com 2012-06-17 01:50 pm (UTC)(link)
Очень странные графики... Хаскель (GHC) в среднем так же многословен и быстр как Паскаль (Free Pascal)?

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 14:08 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-17 15:49 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 15:53 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 17:21 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 11:03 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 17:19 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:11 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 19:25 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:31 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 04:45 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-18 04:48 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 11:04 (UTC) - Expand

[identity profile] theiced.livejournal.com 2012-06-17 02:08 pm (UTC)(link)
он говноед же. const char* const s; идите нахуй.

[identity profile] vaddimka.livejournal.com 2012-06-17 03:59 pm (UTC)(link)
там тривиально все, по крайней мере в том месте о котором ты говоришь
если кажется сложным - пиши на objective-c (бугага)

[identity profile] metaclass.livejournal.com 2012-06-17 05:22 pm (UTC)(link)
Нет уж, мы лучше по старинке, на хаскеле. :)

[identity profile] vaddimka.livejournal.com 2012-06-17 06:06 pm (UTC)(link)
покажи мне, что ли, энкодер видео на хаскеле :)
или стример того же видео / аудио
на эрланге видел, на хаскеле - нет еще
пусть даже он будет что-то стороннее из libav* подключать

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 18:16 (UTC) - Expand

(no subject)

[identity profile] vaddimka.livejournal.com - 2012-06-17 18:25 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 19:44 (UTC) - Expand

(no subject)

[identity profile] vaddimka.livejournal.com - 2012-06-17 21:25 (UTC) - Expand

(no subject)

[identity profile] gds.livejournal.com - 2012-06-17 22:58 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-18 05:17 (UTC) - Expand

(no subject)

[personal profile] alll - 2012-06-17 18:52 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:10 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-17 19:36 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:52 (UTC) - Expand

(no subject)

[identity profile] thesz.livejournal.com - 2012-06-17 20:06 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 20:21 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 11:06 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-17 21:12 (UTC) - Expand

(no subject)

[identity profile] vaddimka.livejournal.com - 2012-06-18 01:45 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 05:08 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-18 05:16 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-18 06:11 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 11:14 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-18 15:10 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-18 15:49 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-18 16:42 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-19 02:10 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-19 02:36 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-18 15:14 (UTC) - Expand

(no subject)

[identity profile] nivanych.livejournal.com - 2012-06-19 02:25 (UTC) - Expand

(no subject)

[identity profile] aamonster.livejournal.com - 2012-06-18 08:29 (UTC) - Expand

[identity profile] blackyblack.livejournal.com 2012-06-17 05:52 pm (UTC)(link)
И вообще, это не крестики. В сях ровно то же самое есть. К тому же конст/не конст и куча/стек очень полезны для ембеддед применений.

[identity profile] metaclass.livejournal.com 2012-06-17 05:56 pm (UTC)(link)
Ссылок в С нету, слава богу.

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-17 18:00 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-18 06:18 (UTC) - Expand

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-18 06:34 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:11 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-17 19:23 (UTC) - Expand

(no subject)

[identity profile] yantayga.livejournal.com - 2012-06-17 19:32 (UTC) - Expand

(no subject)

[identity profile] trueblacker.livejournal.com - 2012-06-20 17:56 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-21 05:34 (UTC) - Expand

[identity profile] guamoka.livejournal.com 2012-06-17 07:09 pm (UTC)(link)
Если горошину можно засунуть в ухо, это еще не значит, что так нужно делать.

[identity profile] metaclass.livejournal.com 2012-06-17 07:22 pm (UTC)(link)
Судя по содержимому буста и libtorrent оне там в ухи ональные пробки с личной подписью страуструпа пихают.

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-17 19:32 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 21:07 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-17 21:19 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 21:25 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-17 21:33 (UTC) - Expand

(no subject)

[identity profile] theiced.livejournal.com - 2012-06-17 22:50 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-18 11:32 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-18 11:50 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-18 12:10 (UTC) - Expand

(no subject)

[identity profile] veter-r-r.livejournal.com - 2012-06-20 13:05 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-20 13:07 (UTC) - Expand

(no subject)

[identity profile] veter-r-r.livejournal.com - 2012-06-20 13:09 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-06-18 05:12 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-18 11:25 (UTC) - Expand

(no subject)

[identity profile] guamoka.livejournal.com - 2012-06-18 11:23 (UTC) - Expand

(no subject)

[identity profile] dnovikoff.livejournal.com - 2012-06-18 02:20 (UTC) - Expand

[identity profile] aamonster.livejournal.com 2012-06-17 08:48 pm (UTC)(link)
Александреску бы с вами не согласился.

[identity profile] http://users.livejournal.com/mak_/ 2012-06-17 08:27 pm (UTC)(link)
во времена оные, когда только-только появился borland c++, у меня в знакомых был один программист. пока остальной народ нерешительно пробовал и щупал плюсы, сравнивая с turbo c, он решительно перелез на ++ и всем рассказывал, что это хорошо и хорошо весьма. был допрошен с пристрастием и сознался, что всю прошлую жизнь его мучили стандартные сишные комментарии вида /* */, но вот в плюсах наконец ввели комментарии типа //. и это все, чего ему надо для счастья. остальные ++погремушки его не волновали.

[identity profile] metaclass.livejournal.com 2012-06-18 05:14 am (UTC)(link)
Чудесно. Это как я на кложурь переполз, потому что там наконец-то можно мои бухгалтерские правила в естественном виде записать :)

(no subject)

[identity profile] blackyblack.livejournal.com - 2012-06-18 05:37 (UTC) - Expand

(no subject)

[identity profile] thedeemon.livejournal.com - 2012-06-19 02:40 (UTC) - Expand