[fpc-devel] FPC implementation of attributes for language parts.
Maciej Izak
hnb.code at gmail.com
Mon May 23 14:56:35 CEST 2016
2016-04-13 13:46 GMT+02:00 Michael Van Canneyt <michael at freepascal.org>:
> On Wed, 13 Apr 2016, Maciej Izak wrote:
>
> 2016-04-13 13:03 GMT+02:00 Michael Van Canneyt <michael at freepascal.org>:
>>
>> Sorry. This is simply very bad design.
>>>
>>>
>> I agree with many points. Frankly, I was surprised that they did something
>> like using attributes in that way. I try to understand and find something
>> positive.
>>
>
> Sometimes, there is nothing positive to be found, even with the biggest
> microscope.... :-)
I think is worth to cite people from "Delphi core".
*Don't beat me for this, this is just quotation* (not my personal opinion).
Source:
http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html
by Marco Cantu:
=== quote begin ===
Odd getting two comments about the attributes syntax. First, that
syntax is in the product since Delphi 2010, so not exactly new.
Second this is the syntax that has been used a few years now for
mobile...
As any other attribute, these attributes are applied to the following
symbol. They can also be equally applied to different types of
symbols (types, methods, declarations, parameters, return values).
The syntax you are suggesting is hard to apply in this different
cases. Also using the attribute syntax for predefined and user-
defined attributes is very consistent. Other languages do it...
because it is nice, expressive, and flexible.
I was in fact chatting earlier with a developer who is
experimenting with the [Result: Unsafe] modifier. Hard to express
with a "traditional" syntax.
BTW: there is also the new [volatile] attribute in 10.1 Berlin.
=== quote end ===
by Rudy Velthuis ...
=== quote begin ===
For all those who don't like the attribute syntax, it
looks indeed ugly if you write
[Result: unsafe] function Bla...
but not if you format it slightly differently
(actually, the usual way):
[Result: unsafe]
function Bla...
That looks perfectly acceptable to me.
=== quote end ===
oh my... [Result: unsafe] is a monster ;d
--
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160523/c7f02101/attachment.html>
More information about the fpc-devel
mailing list