[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Which ObjC2.0 features are missing in the latest GCC?
From: |
H. Nikolaus Schaller |
Subject: |
Re: Which ObjC2.0 features are missing in the latest GCC? |
Date: |
Fri, 29 Nov 2019 18:18:14 +0100 |
> Am 29.11.2019 um 17:30 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:
>
> Hi,
>
> Derek Fawcus wrote:
>> While dropping support for GCC does not strike me as a problem,
>> switching the core implementation to depend upon C++ may well do.
>>
>> How many developers are comfortable with C++?
>
> I don't like it. Actually, my love for GNUstep is not only the OpenStep-like
> API, but Objective-C (1.0) which is just a language I grew in very well
I have a very similar preference.
> I don't like C++, although it has some merits, it is easy to write complex
> code. I do work on projects wich use C++ extensively and I hate districating
> myself in the tangle of C++-isms.
> It is a matter of taste, I suppose.
This touches a quite fundamental aspect of programming languages: complexity of
concepts, writeability, readability, and reliability (bug free) and maybe more.
These are in conflict and every language tries to optimize in one direction on
the cost of something else.
I would for example say:
ObjC1:
- low concept complexity: there are just some @keywords for defining classes
and methods, id type, [] to call methods and delegation to handle callbacks.
- This leads to "prosa" code which can be easily read even 10 years after
writing.
- Writing takes more time and the programmer has to explicitly care about
alloc/copy/retain+release.
- unless the programmer or reviewer knows the rules by heart there may be bugs
by wrong memory management
C++:
- high concept complexity: overloading of operators, templates just to name some
- This leads to cryptic code and can make it very difficult to undertstand what
is going on
- writing is less typing effort if someone knows the concepts
ObjC++ and ObjC-2 try to find a synthesis on different levels:
ObjC++ mixes both leading to code which has just some of the benefits but all
drawbacks.
ObjC2 tries to add type safety, ARC, dot notation, blocks to make the
programmer press less keys.
ARC and type safety can reduce the number of bugs.
But code can become more difficult to read and understand.
Swift: simplifies some things compared to ObjC2 (by removing C heritage) and
adds new things like optionals.
So I personally prefer ObjC1 because of the high readability and low complexity
of concepts and the additional effort of more typing [] instead of . and taking
care of retain/release does not feel like a big burden. So that I can focus on
the algorithms instead of finding tricky notation for what I want to express.
Others prefer (understandably) ObjC2 because it looks more familiar if they did
learn JAVA before.
And still others prefer Swift because it is tagged as "modern".
>
> Since GNUstep for me is in great part "fun" (although I managed to get some
> enterprise tools done, they are still Open Source) coding for it should
> retain (no pun on ARC intended) this fun part.
Yes, fun is a big part. It is just different what people consider as fun: Jazz,
Pop, Heavy Metal, Folk songs, Operas etc...
BR,
Nikolaus
- Re: Which ObjC2.0 features are missing in the latest GCC?, (continued)
- Re: Which ObjC2.0 features are missing in the latest GCC?, Bertrand Dekoninck, 2019/11/19
- Re: Which ObjC2.0 features are missing in the latest GCC?, David Chisnall, 2019/11/19
- Re: Which ObjC2.0 features are missing in the latest GCC?, Jordan Schidlowsky, 2019/11/19
- Re: Which ObjC2.0 features are missing in the latest GCC?, Ivan Vučica, 2019/11/19
- Re: Which ObjC2.0 features are missing in the latest GCC?, David Chisnall, 2019/11/20
- Re: Which ObjC2.0 features are missing in the latest GCC?, Derek Fawcus, 2019/11/20
- Re: Which ObjC2.0 features are missing in the latest GCC?, Gregory Casamento, 2019/11/20
- Re: Which ObjC2.0 features are missing in the latest GCC?, David Chisnall, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Richard Frith-Macdonald, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Riccardo Mottola, 2019/11/29
- Re: Which ObjC2.0 features are missing in the latest GCC?,
H. Nikolaus Schaller <=
- Re: Which ObjC2.0 features are missing in the latest GCC?, Gregory Casamento, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Gregory Casamento, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Andreas Fink, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Gregory Casamento, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Matt Rice, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, David Wetzel, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, Gregory Casamento, 2019/11/21
- Re: Which ObjC2.0 features are missing in the latest GCC?, H. Nikolaus Schaller, 2019/11/22
- Re: Which ObjC2.0 features are missing in the latest GCC?, David Chisnall, 2019/11/22
- Re: Which ObjC2.0 features are missing in the latest GCC?, H. Nikolaus Schaller, 2019/11/22