Food for thought - language string improvement

classic Classic list List threaded Threaded
47 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Food for thought - language string improvement

Graeme Geldenhuys-6
Ever had a problem like this?  You have some SQL, say:

SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
FULL OUTER JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
ORDER BY Customers.CustomerName;


and you want to add that SQL to the SQL property of a query at runtime.
You end up either having to turn this into a string like this:

'SELECT Customers.CustomerName, Orders.OrderID' +
'FROM Customers' +
'FULL OUTER JOIN Orders' +
'ON Customers.CustomerID = Orders.CustomerID' +
'ORDER BY Customers.CustomerName;'

or manually in each line like this (oh please NEVER do this!):

FDQuery1.SQL.Add('SELECT Customers.CustomerName, Orders.OrderID');
FDQuery1.SQL.Add('FROM Customers');
FDQuery1.SQL.Add('FULL OUTER JOIN Orders');
FDQuery1.SQL.Add('ON Customers.CustomerID = Orders.CustomerID');
FDQuery1.SQL.Add('ORDER BY Customers.CustomerName;');


Now this has normally not been much of a problem for me, because part of
tiOPF's support tools, there is a tool name tiSQLEditor  that does
bi-directional conversions for you - to and from quoted strings for SQL.
And even straight from/to the clipboard. This tool has been around for
17+ years. But why must this be a tool problem or a IDE problem? Why
can't the Object Pascal language solve this for us!

[the following part quoted from a online discussion by somebody else - I
fully agree with his thoughts though]

Imagine if FPC had type inference and multi-line strings, neither very
exotic features. The code then becomes:

=========================================
var query := '''SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
FULL OUTER JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
ORDER BY Customers.CustomerName;'''

FDQuery1.SQL.Add(query);
=========================================


Easier to read, easier to edit, no need for a IDE wizard or external tools.

Language features like this is what increases productivity. But
unfortunately it seems we all rather rely on a specific tool or IDE to
improve our productivity - thus also locking us into using those tools only.


Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Marcos Douglas B. Santos
On Thu, Jul 6, 2017 at 11:13 AM, Graeme Geldenhuys
<[hidden email]> wrote:

>
> Imagine if FPC had type inference and multi-line strings, neither very exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''
>
> FDQuery1.SQL.Add(query);
> =========================================
>
>
> Easier to read, easier to edit, no need for a IDE wizard or external tools.
>
> Language features like this is what increases productivity. But unfortunately it seems we all rather rely on a specific tool or IDE to improve our productivity - thus also locking us into using those tools only.

That would be very, very nice.
And instead of using [ " ' sql ' " ] would be better to use just [ " sql " ].

Best regards,
Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Karoly Balogh (Charlie/SGR)
In reply to this post by Graeme Geldenhuys-6
Hi,

On Thu, 6 Jul 2017, Graeme Geldenhuys wrote:

> Imagine if FPC had type inference and multi-line strings, neither very
> exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''
>
> FDQuery1.SQL.Add(query);
> =========================================
>
> Easier to read, easier to edit, no need for a IDE wizard or external
> tools.
>
> Language features like this is what increases productivity.

Stuff like this looks almost as bad to me, as PHP intermixed with HTML and
Javascript. But sure, web devs are well known for their productivity... :P

(And I'm quite conservative on such things, so ignore me. :) )

Charlie
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Graeme Geldenhuys-6
On 2017-07-06 15:35, Karoly Balogh (Charlie/SGR) wrote:
> But sure, web devs are well known for their productivity... :P

Just in case you thought I was a web developer - far from it!

Anyway, the idea was just that - an idea (and possibly an improvement)
on an age old problem. I have no means or skills to implement something
like that in FPC. But I thought it might be worth a discussion. I like
to think outside the box every now and again - most of my projects show
that.

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

AndreasGMail
In reply to this post by Graeme Geldenhuys-6
Graeme, I am a big fan of your messages. You have many good ideas and I
sometimes read a theme that I am not interested in just to see your
response.

In this case however I think you are wrong. Pascal has fantastic
inherent type and error checking in its structure. It would be wrong to
have an editor that can introduce unwanted errors. Just one way that I
can see potential problems in you code style is the line end. Not every
string is a SQL text which is very flexible in it's interpretation.
Other string may want one or more spaces between the last symbol on the
top line and the first on the second, today the editor normally strips
these spaces away. If they are left in, they are spaces that visually I
can not determine just by looking at the code. A mess.

For this reason I would be against this implementation. Maybe taking
away the need for the + sign at the end of the line. The strings are
concatenated until a semi-colon or other symbol is encountered


On 06/07/2017 11:13, Graeme Geldenhuys wrote:

> Ever had a problem like this?  You have some SQL, say:
>
> SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;
>
>
> and you want to add that SQL to the SQL property of a query at
> runtime. You end up either having to turn this into a string like this:
>
> 'SELECT Customers.CustomerName, Orders.OrderID' +
> 'FROM Customers' +
> 'FULL OUTER JOIN Orders' +
> 'ON Customers.CustomerID = Orders.CustomerID' +
> 'ORDER BY Customers.CustomerName;'
>
> or manually in each line like this (oh please NEVER do this!):
>
> FDQuery1.SQL.Add('SELECT Customers.CustomerName, Orders.OrderID');
> FDQuery1.SQL.Add('FROM Customers');
> FDQuery1.SQL.Add('FULL OUTER JOIN Orders');
> FDQuery1.SQL.Add('ON Customers.CustomerID = Orders.CustomerID');
> FDQuery1.SQL.Add('ORDER BY Customers.CustomerName;');
>
>
> Now this has normally not been much of a problem for me, because part
> of tiOPF's support tools, there is a tool name tiSQLEditor that does
> bi-directional conversions for you - to and from quoted strings for
> SQL. And even straight from/to the clipboard. This tool has been
> around for 17+ years. But why must this be a tool problem or a IDE
> problem? Why can't the Object Pascal language solve this for us!
>
> [the following part quoted from a online discussion by somebody else -
> I fully agree with his thoughts though]
>
> Imagine if FPC had type inference and multi-line strings, neither very
> exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''
>
> FDQuery1.SQL.Add(query);
> =========================================
>
>
> Easier to read, easier to edit, no need for a IDE wizard or external
> tools.
>
> Language features like this is what increases productivity. But
> unfortunately it seems we all rather rely on a specific tool or IDE to
> improve our productivity - thus also locking us into using those tools
> only.
>
>
> Regards,
>   Graeme
>

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Karoly Balogh (Charlie/SGR)
In reply to this post by Graeme Geldenhuys-6
Hi,

On Thu, 6 Jul 2017, Graeme Geldenhuys wrote:

> On 2017-07-06 15:35, Karoly Balogh (Charlie/SGR) wrote:
> > But sure, web devs are well known for their productivity... :P
>
> Just in case you thought I was a web developer - far from it!
>
> Anyway, the idea was just that - an idea (and possibly an improvement)
> on an age old problem. I have no means or skills to implement something
> like that in FPC. But I thought it might be worth a discussion. I like
> to think outside the box every now and again - most of my projects show
> that.

Sure, we should be free to discuss such proposals, nothing wrong with
that. I just stated my opinion, but that shouldn't stop discussion in any
way. :)

Charlie
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Marco van de Voort
In reply to this post by Graeme Geldenhuys-6
In our previous episode, Graeme Geldenhuys said:

>
> Imagine if FPC had type inference and multi-line strings, neither very
> exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''


''' already has meaning, you'll see that

var s : ansistring;
begin
  s:='''text''';
end.

already compiles now.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Bernd Oppolzer
In reply to this post by AndreasGMail

Am 06.07.2017 um 18:32 schrieb Andreas:
>
> For this reason I would be against this implementation. Maybe taking
> away the need for the + sign at the end of the line. The strings are
> concatenated until a semi-colon or other symbol is encountered

This is what the (new) Stanford Pascal compiler does:

program TESTLSTR ( OUTPUT ) ;

var ZEILE : array [ 1 .. 200 ] of CHAR ;
     I : INTEGER ;

begin (* HAUPTPROGRAMM *)
   ZEILE := 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
            'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
            'cccccccccccccccccccccccccccccccccccc'
            'dddddddddddddddddddddddddddddddddddd'
            'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' ;
   WRITELN ( ZEILE ) ;
   MEMSET ( ADDR ( ZEILE ) , 'b' , 200 ) ;
   WRITELN ( ZEILE ) ;
   for I := 1 to 200 do
     ZEILE [ I ] := '=' ;
   WRITELN ( ZEILE ) ;
end (* HAUPTPROGRAMM *) .

that is: long strings may be concatenated simply by closing
the string constant on one line and reopening it on the next line.

http://bernd-oppolzer.de/job9.htm

HTH, kind regards

Bernd

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

dmitry boyarintsev
In reply to this post by Marcos Douglas B. Santos
On Thu, Jul 6, 2017 at 10:27 AM, Marcos Douglas B. Santos <[hidden email]> wrote:
That would be very, very nice.
And instead of using [ " ' sql ' " ] would be better to use just [ " sql " ].

The thread of discussion:


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Free Pascal - General mailing list
In reply to this post by Graeme Geldenhuys-6
On 06.07.2017 16:13, Graeme Geldenhuys wrote:

> Imagine if FPC had type inference and multi-line strings, neither very
> exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''
>
> FDQuery1.SQL.Add(query);
> =========================================
>
>
> Easier to read, easier to edit, no need for a IDE wizard or external tools.

Completely ignoring the type inference which I'm definitely not a fan of
- at least not in Pascal: In my opinion it would be better to improve
and finalize the $IncludeStringFile patch from issue #25536 (
https://bugs.freepascal.org/view.php?id=25536 ).
It has the advantage that it doesn't change the language and that the
include file can be viewed independently with an appropriate syntax
highlighter (especially with more complex SQL statements - to stick with
your example - that is something that I'd really welcome).
Of course it has the disadvantage that one can't easily add variables,
but for things like this one can always pass the included string to
Format() and friends which in my opinion would be more cleaned up anyway.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Mark Morgan Lloyd-5
On 06/07/17 20:00, Sven Barth via fpc-pascal wrote:
> On 06.07.2017 16:13, Graeme Geldenhuys wrote:> Imagine if FPC had type inference and multi-line strings, neither very> exotic features. The code then becomes:> > =========================================> var query := '''SELECT Customers.CustomerName, Orders.OrderID> FROM Customers> FULL OUTER JOIN Orders> ON Customers.CustomerID = Orders.CustomerID> ORDER BY Customers.CustomerName;'''> > FDQuery1.SQL.Add(query);> =========================================> > > Easier to read, easier to edit, no need for a IDE wizard or external tools.
> Completely ignoring the type inference which I'm definitely not a fan of- at least not in Pascal: In my opinion it would be better to improveand finalize the $IncludeStringFile patch from issue #25536 (https://bugs.freepascal.org/view.php?id=25536 ).It has the advantage that it doesn't change the language and that theinclude file can be viewed independently with an appropriate syntaxhighlighter (especially with more complex SQL statements - to stick withyour example - that is something that I'd really welcome).Of course it has the disadvantage that one can't easily add variables,but for things like this one can always pass the included string toFormat() and friends which in my opinion would be more cleaned up anyway.

Some sort of heredoc approach would seem reasonable and I think it might
be worth noting the PostgreSQL way:

$$Dianne's horse$$
$SomeTag$Dianne's horse$SomeTag$

$function$
BEGIN
     RETURN ($1 ~ $q$[\t\r\n\v\\]$q$);
END;
$function$

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

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Graeme Geldenhuys-6
In reply to this post by dmitry boyarintsev
On 2017-07-06 20:07, Dmitry Boyarintsev wrote:
> The thread of discussion:
> http://lists.freepascal.org/pipermail/fpc-devel/2016-February/036709.html


Thanks for the link. Seems this topic has already been discussed a year
and a bit ago.

Anybody know if there was any movement on the $IncludeString idea?

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Michael Van Canneyt
In reply to this post by Free Pascal - General mailing list


On Thu, 6 Jul 2017, Sven Barth via fpc-pascal wrote:

> On 06.07.2017 16:13, Graeme Geldenhuys wrote:
>> Imagine if FPC had type inference and multi-line strings, neither very
>> exotic features. The code then becomes:
>>
>> =========================================
>> var query := '''SELECT Customers.CustomerName, Orders.OrderID
>> FROM Customers
>> FULL OUTER JOIN Orders
>> ON Customers.CustomerID = Orders.CustomerID
>> ORDER BY Customers.CustomerName;'''
>>
>> FDQuery1.SQL.Add(query);
>> =========================================
>>
>>
>> Easier to read, easier to edit, no need for a IDE wizard or external tools.
>
> Completely ignoring the type inference which I'm definitely not a fan of
> - at least not in Pascal: In my opinion it would be better to improve
> and finalize the $IncludeStringFile patch from issue #25536 (
> https://bugs.freepascal.org/view.php?id=25536 ).

Sven,

What stops us from applying the patch ?
It has been in Mantis for ages.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Free Pascal - General mailing list
In reply to this post by Graeme Geldenhuys-6

Am 06.07.2017 23:34 schrieb "Graeme Geldenhuys" <[hidden email]>:
>
> On 2017-07-06 20:07, Dmitry Boyarintsev wrote:
>>
>> The thread of discussion:
>> http://lists.freepascal.org/pipermail/fpc-devel/2016-February/036709.html
>
>
>
> Thanks for the link. Seems this topic has already been discussed a year and a bit ago.
>
> Anybody know if there was any movement on the $IncludeString idea?

See my message from yesterday night. :)

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

noreply
In reply to this post by Graeme Geldenhuys-6
On 2017-07-06 09:13, Graeme Geldenhuys wrote:

> Ever had a problem like this?  You have some SQL, say:
>
> SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;
>
>
> and you want to add that SQL to the SQL property of a query at
> runtime. You end up either having to turn this into a string like
> this:
>
> 'SELECT Customers.CustomerName, Orders.OrderID' +
> 'FROM Customers' +
> 'FULL OUTER JOIN Orders' +
> 'ON Customers.CustomerID = Orders.CustomerID' +
> 'ORDER BY Customers.CustomerName;'
>
> or manually in each line like this (oh please NEVER do this!):
>
> FDQuery1.SQL.Add('SELECT Customers.CustomerName, Orders.OrderID');
> FDQuery1.SQL.Add('FROM Customers');
> FDQuery1.SQL.Add('FULL OUTER JOIN Orders');
> FDQuery1.SQL.Add('ON Customers.CustomerID = Orders.CustomerID');
> FDQuery1.SQL.Add('ORDER BY Customers.CustomerName;');
>
>
> Now this has normally not been much of a problem for me, because part
> of tiOPF's support tools, there is a tool name tiSQLEditor  that does
> bi-directional conversions for you - to and from quoted strings for
> SQL. And even straight from/to the clipboard. This tool has been
> around for 17+ years. But why must this be a tool problem or a IDE
> problem? Why can't the Object Pascal language solve this for us!
>
> [the following part quoted from a online discussion by somebody else -
> I fully agree with his thoughts though]
>
> Imagine if FPC had type inference and multi-line strings, neither very
> exotic features. The code then becomes:
>
> =========================================
> var query := '''SELECT Customers.CustomerName, Orders.OrderID
> FROM Customers
> FULL OUTER JOIN Orders
> ON Customers.CustomerID = Orders.CustomerID
> ORDER BY Customers.CustomerName;'''
>
> FDQuery1.SQL.Add(query);
> =========================================
>
>
> Easier to read, easier to edit, no need for a IDE wizard or external
> tools.
>
> Language features like this is what increases productivity. But
> unfortunately it seems we all rather rely on a specific tool or IDE to
> improve our productivity - thus also locking us into using those tools
> only.
>
>
> Regards,
>   Graeme

This multiline string issue also helps with HTML:

s := '<html>' +
        '<head>' +
        '</head>' +
        '<body>' +

Instead it should be a multiline string:

s := '''
   <html>
     <head>
     </head>
     <body>
'''

There is also the backquote character, as an option..
`some string
on multiple
lines`


GoLang has multiline strings that work pretty good. AFAIR php has them
too, especially for html work - but that is likely because PHP is for
web programming and needed that feature more than Pascal did, so the
strong need caused them to implement it more than other langauges.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Felipe Monteiro de Carvalho
In reply to this post by Graeme Geldenhuys-6
> Language features like this is what increases productivity.

Indeed {$INCLUDESTRINGFILE file} looks like a great solution for this.

Since we are talking about language features, after learning Java I
think we could use in Pascal:

1> Default methods in interfaces (implementation multiple-inheritance,
would be extremely useful in Lazarus)

2> Try with resources like in Java

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Ched
In reply to this post by noreply
Is this acceptable ?

> 'SELECT Customers.CustomerName, Orders.OrderID' +
> 'FROM Customers' +
> 'FULL OUTER JOIN Orders' +
> 'ON Customers.CustomerID = Orders.CustomerID' +
> 'ORDER BY Customers.CustomerName;'

I think that one have to insert space at some loactions:
'SELECT Customers.CustomerName, Orders.OrderID' +
' FROM Customers' +
' FULL OUTER JOIN Orders' +
' ON Customers.CustomerID = Orders.CustomerID' +
' ORDER BY Customers.CustomerName;';

Cheers, Ched
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Graeme Geldenhuys-6
In reply to this post by Marco van de Voort
On 2017-07-06 17:52, Marco van de Voort wrote:
> ''' already has meaning, you'll see that

The 3 quotes were simply an idea. You correctly identified that it is
already used is some special cases, so then simply replace it with some
other unique syntax that is not used yet. As Z505 mentioned, even the
back-tick symbol should be a good option, and not used by Object Pascal
syntax yet. For simpler typing, seeing as not all keyboard layouts seem
to have the back-tick readily available, maybe the quote-quote could be
used - as far as I know Object Pascal doesn't use that yet. But if I had
to choose between the two, I would opt for the back-tick as it is more
clearly distinguishable.

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Graeme Geldenhuys-6
In reply to this post by Felipe Monteiro de Carvalho
On 2017-07-08 07:57, Felipe Monteiro de Carvalho wrote:
> Since we are talking about language features, after learning Java I
> think we could use in Pascal:

I must say, after using Java more and more in recent months, it starts
to show why so many developers call Delphi/Object Pascal out of date. [I
never thought I would ever say that - I have a real soft spot for Object
Pascal]

The Java language has some awesome features and much less typing is
required - yet not as cryptic as C/C++. The Java IDEs (primarily Eclipse
and IntelliJ IDEA) also blow Lazarus and MSEide out of the water - but
then they have a ton more resources at their disposal). Either way,
those IDEs are a real pleasure to work with, and have so many programmer
friendly features.

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Food for thought - language string improvement

Michael Van Canneyt


On Sun, 9 Jul 2017, Graeme Geldenhuys wrote:

> On 2017-07-08 07:57, Felipe Monteiro de Carvalho wrote:
>> Since we are talking about language features, after learning Java I
>> think we could use in Pascal:
>
> I must say, after using Java more and more in recent months, it starts
> to show why so many developers call Delphi/Object Pascal out of date. [I
> never thought I would ever say that - I have a real soft spot for Object
> Pascal]
>
> The Java language has some awesome features and much less typing is
> required - yet not as cryptic as C/C++. The Java IDEs (primarily Eclipse
> and IntelliJ IDEA) also blow Lazarus and MSEide out of the water - but
> then they have a ton more resources at their disposal). Either way,
> those IDEs are a real pleasure to work with, and have so many programmer
> friendly features.

Would it be possible to give examples ?
Maybe there are things that can be done in Lazarus, and Pascal ?

I'm doing some work in a Java environment  myself lately, and I must
say I have not noticed anything of these 'language features'.
Lots of useful libraries, yes.  There I will not argue.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
123