Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-25 Thread Florian Klaempfl
Am 22.11.2016 um 15:29 schrieb Mattias Gaertner: > You forgot to consider how scanners work, i.e. how they check and > skip spaces. > > Here are some numbers: > > Compiling Lazarus sources 'make clean all' 1249309 lines 3 times > 0m51.682s > 0m51.415s > 0m51.698s > > Lazarus uses indentation of

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread James Richters
The problem with your example "text_with_tabs_Input-Sans_proportional_font_and_ET.png" is that the underscores and the word Range and the brackets are all out of alignment, even though everything is re-aligned again with the := I prefer the array elements to also be aligned as well. In my

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Mattias Gaertner
On Tue, 22 Nov 2016 13:32:03 + Graeme Geldenhuys wrote: > On 2016-11-22 13:26, Sven Barth wrote: > > I think the difference a tab versus a couple of spaces makes (even if > > across a whole file or a whole project) will be insignificant > > Well, for every byte in the file, the parser need

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Reimar Grabowski
On Tue, 22 Nov 2016 12:41:37 + Graeme Geldenhuys wrote: > hahaha... I love how a con is “fundamentally different concept”. How is > that a con? Fundamentally different to the way current IDEs/editors process their text -> too much work for a feature no one gives a flying f**k about. Got it?

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Vojtěch Čihák
s Datum: 21.11.2016 15:46 Předmět: [fpc-pascal] Underscores in numerical literals - grouping I don't know about you, but I like this idea implemented in Java 7 and later. http://jasdhir.blogspot.co.uk/2016/11/using-underscores-in-literals.html <http://jasdhir.blogspot.co.uk/2016/11/using-

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Jonas Maebe
Hi, Now that the discussion moved from a potential compiler feature to coding style preferences, can we please move it to the fpc-other list? Thanks, Jonas FPC mailing lists admin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:/

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 13:12, Martin Schreiber wrote: > I think you are wrong. And you have all the right in the world to say that. Just like I would say I can't read your code at all - because everything is lowercase and with only 1-space indentation. Your coding style - your preference. Each developer h

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 13:26, Lars wrote: > As for underscores in numbers, it is an interesting idea but I see delphi > compatibility issues coming up any code you want to port has to be > converted to non underscores Who in there right mind would ever want to move from Free Pascal to Delphi! The reve

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 13:26, Sven Barth wrote: > I think the difference a tab versus a couple of spaces makes (even if > across a whole file or a whole project) will be insignificant Well, for every byte in the file, the parser needs to figure out what to do with it. Less bytes, means less processing cycl

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Lars
On Tue, November 22, 2016 6:12 am, Martin Schreiber wrote: > On 11/21/2016 03:46 PM, Graeme Geldenhuys wrote: > >> The age old rule >> of programmer source code always being in a mono-spaced font is >> ridiculous for this day and age. >> ... > A programmer scans code most the time vertically > or b

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Sven Barth
Am 22.11.2016 12:14 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > But to give you an idea of what the above source code will look like in > other editors. Take my code sample above, replace the spaces with single > TAB (U+0009) characters. This not only reduces the file size, it a

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 12:59, Stephen Chrzanowski wrote: > tables/divs/CSS that change those sites around so I can view the way I want > to, not the way they THINK is best for me. And there is no difference to that and an editor that supports ET. If you don't want to use ET, simply disable it, and go about

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Martin Schreiber
On 11/21/2016 03:46 PM, Graeme Geldenhuys wrote: >The age old rule > of programmer source code always being in a mono-spaced font is > ridiculous for this day and age. > I think you are wrong. A programmer scans code most the time vertically or block by block and not horizontally and word by word a

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Stephen Chrzanowski
Now we're getting into the field of personal preferences, and EVERYONE and their neighbor on the internet is going to defend their personal preferences like a rabid dog over a piece of meat. Looking at a screen all day long, comfortably, is ultimately up to the person sitting in the chair at that

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 11:15, Jürgen Hestermann wrote: > I am still not sure how exactly elastic tab stops work. Think how a word processor (MS Word, LibreOffice Writer) interprets tabstops. Word Processors don't define a TAB as x width of Spaces or Pixels. But for some strange reason IDE's and Text Editor

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 11:27, Yann Mérignac wrote: > In Ada at least since 1983. > http://archive.adaic.com/standards/83lrm/html/lrm-02-04.html :-D Thanks for that Yann. Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lis

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-21 23:59, Dmitry Boyarintsev wrote: > I find it a made up problem, inspired by sales department. Not at all. I do agree that using constants is a very good idea, instead of hard-coded "magic numbers", but sometimes you use a value only once in your code, and a constant is simply overkil

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Yann Mérignac
> Is there any other place in any language (programming or natural) where underscored are used in this way? In Ada at least since 1983. http://archive.adaic.com/standards/83lrm/html/lrm-02-04.html 2016-11-22 1:26 GMT+01:00 Gordon Findlay : > Yet another daft idea from java. Is there any other p

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Jürgen Hestermann
I am still not sure how exactly elastic tab stops work. I put standard tabs (#9) in each line and the editor aligns these tabs for adjacent lines? What if an empty line is between such lines? What if I want to start a new 'table' which is not related to preceeding or following lines? In this exam

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-21 23:59, James Richters wrote: > I, l, 1, AND | are all distinctly > different with it as well as 0 and O.I have a REAL pet peeve about > font's that these characters look identical, You do realise that not all monospaced fonts are equals. Some monospaced fonts are terrible for pr

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 08:31, Marco van de Voort wrote: > If you can do it in IDE, do it in IDE, indeed. Indeed. This discussion clearly revealed that having a smarter IDE or text editor is the preferred way to go, compared to implementing a compiler change that supports underscores (like the original arti

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Graeme Geldenhuys
On 2016-11-22 04:41, Flávio Etrusco wrote: > The editor can just switch to a monospaced font when the > vertical/column selecion-mode is toggled, this is what Eclipse does. Exactly, and if you are prefixing something or inserting something in multiple lines that all have the same text, even in pro

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > other editors. > > Elastic Tabstops (ET) only does rendering of the text - based on two > user defined preferences. The underling file doesn't change because of > user preference changes. The underlying file is just a TAB(U+0009) > indented file

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Gordon Findlay
Yet another daft idea from java. Is there any other place in any language (programming or natural) where underscored are used in this way? Any long list of digits will represent a string anyway. My library card had a field with 9 digits, but that sure ain't a number. On 22/11/2016 3:46 am, "Graem

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Flávio Etrusco
On Mon, Nov 21, 2016 at 10:09 PM, James Richters wrote: > I use notepad++ Vertical editing ALL THE TIME, you cannot do vertical editing > effectively with a proportional font. For those who aren't familiar with > it, you can hold down ALT and highlight many lines vertically making a very > ta

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread James Richters
ssage- From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Graeme Geldenhuys Sent: Monday, November 21, 2016 6:42 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Underscores in numerical literals - grouping On 2016-11-21

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Dmitry Boyarintsev
On Mon, Nov 21, 2016 at 9:46 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > I don't know about you, but I like this idea implemented in Java 7 and > later. > > http://jasdhir.blogspot.co.uk/2016/11/using-underscores-in-literals.html > > > I always find it hard to read long numeric

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread James Richters
ced fonts are far and away the best choice for this. -Original Message- From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Marco van de Voort Sent: Monday, November 21, 2016 2:26 PM To: FPC-Pascal users discussions Subject: Re: [fpc-p

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 19:06, Sven Barth wrote: > but also due to the ability to easily compare > different names simply based on their visual length without having to > decide whether the difference is due to the name or the different sized > characters. And here is an example of the exact problem, but w

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 19:06, Sven Barth wrote: > but also due to the ability to easily compare > different names simply based on their visual length without having to > decide whether the difference is due to the name or the different sized > characters. I don't think you fully understand what Elastic Tab

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 19:25, Marco van de Voort wrote: > IOW I don't like editors that store in formats that are nearly useless in > other editors. Elastic Tabstops (ET) only does rendering of the text - based on two user defined preferences. The underling file doesn't change because of user preference ch

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: [ Charset UTF-8 unsupported, converting... ] > On 2016-11-21 16:05, J?rgen Hestermann wrote: > > Why? > > I like monospaced fonts for code very much. > > See my reply to Stephen. More intelligent editors can let you use > monospaced and proportional

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Sven Barth
Am 21.11.2016 18:27 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2016-11-21 15:52, Stephen Chrzanowski wrote: > > but I've always preferred mono-spaced fonts in my IDE versus > > variable width, JUST on the primary basis of legibility of the code itself, > > ignoring the 'gr

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 16:31, Vojtěch Čihák wrote: > I guess Graeme meant to make non-monospaced font look like monospaced > in Lazarus editor No I didn't mean that at all. That would be disastrous. Take a look at my reply to Stephen, and follow the links mentioned there and see the screenshots in the PDF

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 16:05, Jürgen Hestermann wrote: > Why? > I like monospaced fonts for code very much. See my reply to Stephen. More intelligent editors can let you use monospaced and proportional fonts with ease - yet you don't loose code alignment, indentation etc. Elastic Tabstops do just that. It'

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
On 2016-11-21 15:52, Stephen Chrzanowski wrote: > but I've always preferred mono-spaced fonts in my IDE versus > variable width, JUST on the primary basis of legibility of the code itself, > ignoring the 'gravy' of lining up text within the code. Hence I mentioned "think Elastic Tabstops" which so

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Stephen Chrzanowski
heh.. Not really, as GMail uses variable width fonts by default. ;) Imma gunna feex dat. On Mon, Nov 21, 2016 at 11:05 AM, Jürgen Hestermann < juergen.hesterm...@gmx.de> wrote: - > function FileCompareName (Datei1,Datei2 :

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Ralf Quint
On 11/21/2016 8:05 AM, Jürgen Hestermann wrote: Am 2016-11-21 um 15:46 schrieb Graeme Geldenhuys: The age old rule of programmer source code always being in a mono-spaced font is ridiculous for this day and age. Why? I like monospaced fonts for code very much. Code is not a novel or a newspap

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Vojtěch Čihák
17:05 Předmět: Re: [fpc-pascal] Underscores in numerical literals - grouping Am 2016-11-21 um 15:46 schrieb Graeme Geldenhuys: > The age old rule > of programmer source code always being in a mono-spaced font is > ridiculous for this day and age. > Why? I like monospaced fonts for code ve

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Jürgen Hestermann
Am 2016-11-21 um 15:46 schrieb Graeme Geldenhuys: The age old rule of programmer source code always being in a mono-spaced font is ridiculous for this day and age. Why? I like monospaced fonts for code very much. Code is not a novel or a newspaper where you read a lot of text from top down to

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Stephen Chrzanowski
I like the concept, but, if I'm using a constant that goes beyond the millions, I'd add a comment to what the number is in US format, and tag on what exactly it means, or make the variable name itself mean something. Because reading const maxLongint = $7fff; or const maxLongint = 2147483647;

[fpc-pascal] Underscores in numerical literals - grouping

2016-11-21 Thread Graeme Geldenhuys
I don't know about you, but I like this idea implemented in Java 7 and later. http://jasdhir.blogspot.co.uk/2016/11/using-underscores-in-literals.html I always find it hard to read long numeric literals. Alternatively, without needing compiler changes, the IDE's and programmer editors should b