OK I'll answer everything from this email ...
On 6/16/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
On Fri, 16 Jun 2006, Mattias Gaertner wrote:
>>>> 3. Better/Faster IO usage ;)
>>>
>>> Better designed I/O libraries/classes ?
>>
>> Better way to control the I/O buffering etc... so we will not need to
>> "hack" our way to have bigger container then 255 chars...
>
> Perhaps even better: Automatically adapting the buffer size.
> The RTL must work with all kinds of programs. There is no single best buffer
> size.
Because of this, there is the SetTextBuf() call. This is not a hack.
Only the programmer knows what the usage of a particular file will be,
so only he is qualified to make the call.
Well, the problem is that sometimes it's not that easy to tune
things... If everyone here is talking about newbies, then how would
they cope with such tunning tool ?!
>
>>>> 4. The amount of classes that comes with Java as part of the compiler
>>>> :P
>>>
>>> Can live with them. Make your own libraries.
>>
>> You are loosing the reason to work with Pascal. When you have ready to
>> use libraries that come with the language, you increase development,
>> and it means that you can show what the language can actually do. You
>> need a complex graph, plotting etc calculation ? use the "GraphMath"
>> unit... You need an XSLT(2) support ? use the xslt unit. You need SNMP
>> traps support ? use that unit ...etc..
>
> AFAIK the FPC team adds happily new classes to the standard/extra packages.
> Just contribute.
Exactly.
I was declained more then once to add libraries that I wanted to FPC,
and I was asked to make it "thierd party" tool in contributed units...
Only general puposed tools usually accepted... Now it's good, but not
enough... we need something like "package manager" for libraries like
perl's cpan idea, or the linux/bsd ways...
>>>
>>>> 6. "inline" code inside class (like in C++/Java).
>>>
>>> Not recommended. Bad design.
>>
>> Huh ?!
>>
>> destructor Destroy; override;
>> begin
>> inherited Destroy;
>> end;
>>
>> Why should i place it somewhere else ?! To remind you, I could use
>> "inline" command in order to place code of functions in the interface
>> sections on TP... So the Pascal language do have history of such
>> things ...
The above code is superfluous. you don't need this code at all.
Why ? If I have less of 10 lines of code to write, it's easier to
write it in place IMHO ...
interface and implementation are important sections, but it does not
take from the feeling that I (personaly) have for such need.
>
> In OO the implementation should be separate from the interface. Of course
> this is a matter of taste and the used Editor.
No, it's a matter of correct separation of interface and implementation.
Implementation should always be separate from interface.
>
>
>>>> 7. Build in regex syntax like in Perl, Ruby Javascript.
>>>
>>> Replace it, by a library.
>>
>> Why ?!
>> S := 'We are programming in Perl';
>> S :=~ s/Perl/Pascal/s;
>>
>> Doesn't it nicer then to use something like:
>>
>> S := 'We are programming in Python';
>> Regex := TRegex.Create;
>> Regex.compile ('Python',S);
>> S := Regex.Replace ('Pascal', 's');
>>
>> Sure it's cool to use external functions, but it's useful to use it as
>> a syntax structure :)
>
> See ideintf/texttools.pas. Then the above would be
>
> S := 'We are programming in Perl';
> S := REReplace(S,'Perl','Pascal','s');
>
> IMHO this is better to read and better to understand for newbies, than the
> short but cryptic perl syntax.
So newbies does not need to use regex until they fully understand the
way of using it...
Personally I still find new things and ways in regex all of the time.
How can I do the following with REReplace :
s/[^a-z]//gs;
s/(dog|cat|parrot)/animole/g;
s/<abc>(.*?)<\/abc>/$1/g;
and the list of examples goes on and on ...
Exactly.
No way. Why completely change the pascal OO semantics for doing
something that can be done already in other ways and that can be done
on enviroments that was really meant for it (i.e. JavaScript) ?
Are You just fancy using 'begin..end' ? ;-)
Almost all suggestions in this thread (and the previous one) reinforce
my opinion on why many people dislike Pascal: they are lazy bastards!
Most of my colleagues which prefer C++ or Java over Delphi complain
that in Pascal you have to write too much, but they don't accept that
this is straight laziness. But at last, last week a new guy in my
workplace cited as the first reason for him to adore C++ was it is a
nice language for lazy programmers/typers.
Obviously these guys don't care about code readability (not news) and
never had to care about code maintanability :-/ (I presume they don't
like to code at all =P )
I have to admit that doing more typing probably must feel to some like
unnecessary and unneffective, but I absolutely positively doubt anyone
can be more productive in C++ or Java than in Object Pascal (or in
VisualStudio, Eclipse or JDeveloper than in Lazarus or Delphi).
Well a rule of thombs claims that the more code you are writing the
more bugs you add to your program.
Personally I think that most of what I wrote was in order to add me
more tools to need to invest more in the program I need to write and
less on the tools to write such program.
Don't mix the need for tools with laziness, many programming languages
such as Perl does not add support for functions such as "trim" because
the idea is that you can write a regex that will do it, alto many
times you need to repeat it, so at the end you will find 100 copies of
"trim" like functions on many projects that where written in Perl.
You can write every repeated code on the place you need it, but you
really need the time to do other things, you'll use a
function/procedure to store such actions and you will call that
function... it's not because you are lazzy, it's because you know it's
the best way to use this functionallity..
What really puzzles me is how C++ could end so strongly supported on
so many levels.
I can't believe it was (only. lol) because of some "dick size contest"
(i.e. look at my haxor skills, i program in C, Pascal is for girlies),
so it must have slowly evolved from C's terseness, strong
multiplatform support, usage in Unix, etc, to the point that when C++
was created no software powerhouse had the balls to try to change the
rules of the game. And when Borland (almost) had it, MS took the ball
and went playing alone :-/
It's not the language, it's the marketing !!! After bad product that
sells a lot (apchwindowsii) there is a good army of sells and
marketting that do does a good work...
I'm probably wrong, but I think that if Delphi was at the same price
range as VisualStudio, and if Borland ported it to other platforms and
added all compiler optimizations people usually expect from a C
compiler instead of investing in that damned C++Builder, things would
very different now...
See the above answer :)
Ido
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives