Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2016-06-07 Thread Graeme Geldenhuys
On 2015-08-14 00:49, Nikolay Nikolov wrote:
> Well, now all they need is a decent equivalent to Pascal's units 
> (instead of relying on preprocessor hacks such as #include), Pascal's 
> compilation speed, decent RTTI, class types (e.g. "class of tobject") 
> and C++ becomes a halfway-usable language

I've recently been familiarising myself with the Java language, and
later switched from using a plain text editor to using Eclipse IDE to
write my code. WOW, was I pleasantly surprised with Java and Eclipse.

 - I could use compiled .class files created with Java 5, even though
   I'm using Java 8. No recompile of the old code needed.
 - Renaming a class in Eclipse is a single change - Eclipse even takes
   care of the file name change.
 - Because Java doesn't have a header unit (.h) or a Interface section,
   renaming methods, types etc is a single edit change. No search and
   replace needed.
 - Write code that doesn't exist yet (eg: calling a method of a class
   and with arguments). Then press Ctrl+1 and Eclipse implements that
   method with the correct parameter types for you, in the correct file
   and class. Awesome - especially if you code in the TDD style like
   I do.
 - Using Eclipse, I don't actually have to Compile my code - Eclipse
   does it continuously in the background - that is also how it manages
   to report errors or improvements against your code.
 - Even though I'm using Java 8, I can tell Eclipse to recommend better
   code, API usage etc against any earlier Java version. It knows
   exactly what Java version supported what language syntax and
   features. So the code generator will not generate code where certain
   features did not exist in the selected compatibility Java version.
 - Eclipse has an Outline Window, which shows you what a Pascal
   Interface section would show. So even though Java doesn't have an
   explicit Header or Interface section - it really isn't needed at
   all, because the Outline Window tell you everything. Plus, simply
   double click a method there and the code editor takes you to that
   code. Want to rearrange the order of methods or fields? No problem,
   and no need for Cut & Paste either. Simply select and drag them
   around in the Outline Window, and Eclipse will move the actual code
   for you.
 - Enable Format on Save - so even if your indentation, alignment etc
   are not according to the code formatting style you specified,
   Eclipse will reformat your code on Save (all lines, or only changed
   lines can be processed).
 - Eclipse's Refactoring support is out of this world!


And that's just what I discovered in 2 days! I'm really starting to like
Java (and Eclipse) a lot. It has improved so much since my initial
introduction to Java from the late 90's.


Regards,
  Graeme
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-14 Thread Mark Morgan Lloyd

Nikolay Nikolov wrote:


Almost like Pascal's units. :) Although they don't include namespaces and
not intended for binary distribution.
Yes, I know about them, but come on... Turbo Pascal introduced units in 
1987 (in TP4). I think UCSD Pascal had them even before that (I never 
used UCSD, so I don't know). Since then, they've become de facto 
standard in pretty much every Pascal implementation that matters (even 
though they're not in ISO Pascal). C++ has a draft proposal in 2012 
(only 25 years after TP4) and only one compiler implementation in 2015.


On the other hand, C and C++ are children of ALGOL, and the early major 
ALGOL implementations tended towards conditional inclusion etc. rather 
than separate compilation. I think that separate compilation with a 
linkage editor was originally an IBM mainframe thing, Wirth was exposed 
to it at the end of his time at Stanford when they added an IBM 360 to 
the existing Burroughs systems (some stories have it that the ALGOL 
systems were thrown out, but I suspect that they were actually 
transferred to SRI).


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-14 Thread Karoly Balogh (Charlie/SGR)
Hi,

On Fri, 14 Aug 2015, Nikolay Nikolov wrote:

 On 08/13/2015 11:47 PM, Jonas Maebe wrote:
  http://it.slashdot.org/story/15/08/13/1229239
 
  In all fairness, they also optimise it so that they emit fewer checks
  (if you check whether X of the correct type in one statement, you may
  not have to check it again in the next etc) and hence reduce the run
  time overhead. Still... :)
 Well, now all they need is a decent equivalent to Pascal's units (instead of
 relying on preprocessor hacks such as #include),

Meet the C(++) Modules proposal:
http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf

I think CLang/LLVM already implemented it.
http://clang.llvm.org/docs/Modules.html

Almost like Pascal's units. :) Although they don't include namespaces and
not intended for binary distribution.

Charlie

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-14 Thread Nikolay Nikolov



On 08/14/2015 11:02 AM, Karoly Balogh (Charlie/SGR) wrote:

Hi,

On Fri, 14 Aug 2015, Nikolay Nikolov wrote:


On 08/13/2015 11:47 PM, Jonas Maebe wrote:

http://it.slashdot.org/story/15/08/13/1229239

In all fairness, they also optimise it so that they emit fewer checks
(if you check whether X of the correct type in one statement, you may
not have to check it again in the next etc) and hence reduce the run
time overhead. Still... :)

Well, now all they need is a decent equivalent to Pascal's units (instead of
relying on preprocessor hacks such as #include),

Meet the C(++) Modules proposal:
http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf

I think CLang/LLVM already implemented it.
http://clang.llvm.org/docs/Modules.html

Almost like Pascal's units. :) Although they don't include namespaces and
not intended for binary distribution.
Yes, I know about them, but come on... Turbo Pascal introduced units in 
1987 (in TP4). I think UCSD Pascal had them even before that (I never 
used UCSD, so I don't know). Since then, they've become de facto 
standard in pretty much every Pascal implementation that matters (even 
though they're not in ISO Pascal). C++ has a draft proposal in 2012 
(only 25 years after TP4) and only one compiler implementation in 2015.


Nikolay
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-14 Thread Marco van de Voort
In our previous episode, Karoly Balogh (Charlie/SGR) said:
  Well, now all they need is a decent equivalent to Pascal's units (instead of
  relying on preprocessor hacks such as #include),
 
 Meet the C(++) Modules proposal:
 http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf

And Stroustrup is considering modules for C++17:

http://www.infoq.com/news/2015/04/stroustrup-cpp17-interview
 
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-14 Thread Marco van de Voort
In our previous episode, Nikolay Nikolov said:
  http://www.infoq.com/news/2015/04/stroustrup-cpp17-interview
 Yes, I know about that too, but I'm still wondering why it took so long. 
 C++ has an everything but the kitchen sink approach, where they 
 introduce every programming language feature they can think of into the 
 language (they had generics before everyone else, they have multiple 
 inheritance, esoteric class inheritance modes (protected inheritance, 
 wtf), template metaprogramming, etc.), so it's surprising modules took 
 so long.

I'm not deep in the C++ scene, Nico is probably better at answering this,
but if I would have to guess probably a matter of demand. Till now legacy
requirements outweight demand for a solution to this. Also because most C++
don't know or don't want to know the problems.
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-13 Thread Ralf Quint

On 8/13/2015 4:49 PM, Nikolay Nikolov wrote:
Well, now all they need is a decent equivalent to Pascal's units 
(instead of relying on preprocessor hacks such as #include), Pascal's 
compilation speed, decent RTTI, class types (e.g. class of tobject) 
and C++ becomes a halfway-usable language :)
There are only two things wrong with C++: The initial concept and the 
implementation.

-- Bertrand Meyer :-P


Ralf

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] $100, 000 for C++ implementation of FPC's -CR option

2015-08-13 Thread Nikolay Nikolov



On 08/13/2015 11:47 PM, Jonas Maebe wrote:

http://it.slashdot.org/story/15/08/13/1229239

In all fairness, they also optimise it so that they emit fewer checks
(if you check whether X of the correct type in one statement, you may
not have to check it again in the next etc) and hence reduce the run
time overhead. Still... :)
Well, now all they need is a decent equivalent to Pascal's units 
(instead of relying on preprocessor hacks such as #include), Pascal's 
compilation speed, decent RTTI, class types (e.g. class of tobject) 
and C++ becomes a halfway-usable language :)


Nikolay
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other