Re[11]: [Голосование] Используете ли вы синтаксис в LINQ?
От: Sinix  
Дата: 10.12.15 13:31
Оценка: 70 (1)
Здравствуйте, VladD2, Вы писали:

VD>Ну, так и надо приводить в качестве аргумента "необходимость сказать курсором", а не "невозможность реализовать интеллисенс". Чувствуешь разницу?

Влад, проблема в том, что ты споришь с "я так запомнил", а не с "было такое объяснение".

Я ещё на первой странице давал ссылку на объяснение от Де Смета.
Ну и реальные объяснения, которые на конференциях не раз озвучивались, тоже приводил.

Поскольку тема затянулась до маразма, скопирую ещё раз целиком:

... SQL query editors don’t have a crystal ball that can predict what table or view you’re querying when you write:

SELECT Na

How is it supposed to autocomplete what you’re writing when it hasn’t seen the FROM clause (here spelled all caps because we’re talking about SQL) just yet? Moreover, it doesn’t make sense to write SELECT first because it’s the last thing that happens: Tell the source, filter items, sort them, and so on. But projecting the result happens at the very end. So why does it come syntactically first? I don’t know. If there’s a SQL language designer reading this book, send me an email and enlighten me!

DON’T REPEAT MISTAKES
Assuming the SQL order of operations was a mistake (it is), it would be silly to repeat it in today’s language design even if it were for consistency and familiarity with the SQL language people may already know.
In fact, Visual Basic 9.0 was in this camp for a long while, going to great lengths to keep the Select clause (here using typical Visual Basic spelling of the keyword) in front, with intractable and confusing code editor jumps while typing a query.
It went roughly like this, if I recall correctly:



This was highly unintuitive, and the Visual Basic team eventually surrendered and made the From clause come first. The fear people would dislike it because of its difference from the already familiar SQL language has, as far as I know, never really materialized.

So, even if some SQL language designers would defend their design choices, the .NET developer audience has shown that having the From clause first is much more intuitive in the end.


найди тут хоть слово про "нишмагли в интеллисенс".

VD>Проблема (для пиарщиков) в том, что этот уже довольно слабый аргумент для многих. Многие бы предпочли првычный синтаксис.

Проблема в том, что люди не любят изучать матчасть _перед_ тем, как делать какие-либо утверждения.
На практике даже самые фанатичные сторонники сабжа из VB team после первых же прототипов отказались от идеи.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.