[fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi
After trying out Morfix for some hours, I found very interesting feature of 
the implemented object Pascal language. Morfix Pascal allows space char within 
the identifier's name. If space char is used, then the name MUST BE enclosed 
within a double-quote char pair. Here are some examples:


type Main Form: TForm;
var this is a integer variable: integer;
if Main Form.Left = 10 then ...
procedure Main Form.Edit Change(Event: TDOMEvent);

I think this is a interesting feature to be supported. Though this is not too 
essential, but sometimes it is required or demanded. At least if we want FPC 
more Morfix compatible. I know it looks more VB-ish or MS-ish, but if it is 
good, why not? :)


The implementation of it in the compiler is not too difficult, IMO. Some RTL 
source code modification is required though. CMIIW. :)


What's your opinion?

-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Vincent Snijders

Bisma Jayadi wrote:
After trying out Morfix for some hours, I found very interesting 
feature of the implemented object Pascal language. Morfix Pascal 
allows space char within the identifier's name. If space char is used, 
then the name MUST BE enclosed within a double-quote char pair. Here are 
some examples:


type Main Form: TForm;
var this is a integer variable: integer;
if Main Form.Left = 10 then ...
procedure Main Form.Edit Change(Event: TDOMEvent);

I think this is a interesting feature to be supported. Though this is 
not too essential, but sometimes it is required or demanded. 


I cannot imagine situations where it would be required or demanded 
(maybe desirable, but I don't so). In what cases would it be required or 
demanded?


Vincent
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi

WWWHHH! *Falls off chair*
*grabs desk* *pulls up*
Clear enough ? ;-)


Same respond when the first time I knew that file name is case-sensitive in 
un*x-like OSes (Linux, etc). It looks silly and ridicilous (especially for M$ 
users), but most people still use it (the users like it even more). :P


-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Christian Iversen
On Saturday 25 March 2006 10:50, Bisma Jayadi wrote:
  WWWHHH! *Falls off chair*
  *grabs desk* *pulls up*
  Clear enough ? ;-)

 Same respond when the first time I knew that file name is case-sensitive in
 un*x-like OSes (Linux, etc). It looks silly and ridicilous (especially for
 M$ users), but most people still use it (the users like it even more). :P

But this is a lot more silly. There's \ everywhere!

-- 
Regards,
Christian Iversen
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Dr. Karl-Michael Schindler

Hi

Am 25.03.2006 um 09:39 schrieb Micha Nelissen:


On Sat, 25 Mar 2006 15:21:38 +0700
Bisma Jayadi [EMAIL PROTECTED] wrote:


type Main Form: TForm;
var this is a integer variable: integer;
if Main Form.Left = 10 then ...
procedure Main Form.Edit Change(Event: TDOMEvent);


WWWHHH! *Falls off chair*

*grabs desk* *pulls up*

Clear enough ? ;-)

Micha


I understand your reaction, in particular with the examples above.  
But from own experience I have an argument in favor of less strict  
naming conventions:


I coded a lot in a macro language, which had similar naming  
conventions as Pascal. In one revision they were lifted and examples  
like the above became possible, but not used as expected. However,  
some things were used a lot:


Names starting with a number and using - instead of _.

Based on this examples from practice, I would suggest to consider it  
again.


Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi
I cannot imagine situations where it would be required or demanded 
(maybe desirable, but I don't so). In what cases would it be required or 
demanded?


Say I'm gonna make some kind of game maker application, where user can create 
game objects. It sure the game objects need name as their identifier. For ease 
of use, I can make object's name more space-char-friendly because the user of 
the application is not always a programmer (they even can't understand why an 
object's name can't accept space char).


If the compiler supports space char inside identifier's name, I don't need to do 
some kind of convertion from game maker object's name to internal game maker 
identifier's name because I can grab it directly from the application. Of 
course, I can translate game maker objects name into Object1 to ObjectN, but 
it's not favorable. :)


-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi

Foo a.bar a := baz b[4].foo q


You made a very excessive example. Of course we don't HAVE TO use space char all 
the times. I won't use it that way either. But it's there when we really 
want/need it.


is harder to read! It's not the char itself, it's that it's used all over the 
place whenever this is used. I don't like it.


Maybe you don't like it and that's alright. This feature won't harm you in any 
ways. But some other people could demand it in some circumstances.


-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re[2]: [fpc-devel] space char inside identifier's name

2006-03-25 Thread ϸ�� ����������� � mail.ru
Saturday, March 25, 2006, 1:08:02 PM:

CI Foo a.bar a := baz b[4].foo q

CI is harder to read! It's not the char itself, it's that it's used all over 
the
CI place whenever this is used. I don't like it.

It doesn't look like joke anymore, so I ask: in what aspect (except
double double quotes) the space sign is different from the underline sign?

And if it is, why don't use arbitrary length names with carriage returns,
pictures, music and videos: just use url as the name... (fast
connection required for compiling)

---
 [EMAIL PROTECTED]

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Marco van de Voort
 conventions as Pascal. In one revision they were lifted and examples  
 like the above became possible, but not used as expected. However,  
 some things were used a lot:
 
 Names starting with a number and using - instead of _.

The real big question of course is _WHY_ in earths name would they do that?
And even if one would think creating a language is equal to a generalising
feature creep, and one would throw readability as argument out of the
window, is it really worth quoting all identifiers (if mandatory), and the
confusion if it isn't to be able to have leading numbers in identifiers?


(btw
There is a simple faq btw about extensions, things to do before suggesting a
language feature.

http://www.freepascal.org/faq.html#extensionselect

Specially point 2.
)

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Johann Glaser
Hi!

Am Samstag, den 25.03.2006, 17:19 +0700 schrieb Bisma Jayadi:
  Foo a.bar a := baz b[4].foo q
 
 You made a very excessive example. Of course we don't HAVE TO use space char 
 all 
 the times. I won't use it that way either. But it's there when we really 
 want/need it.
 
  is harder to read! It's not the char itself, it's that it's used all over 
  the 
  place whenever this is used. I don't like it.
 
 Maybe you don't like it and that's alright. This feature won't harm you in 
 any 
 ways. But some other people could demand it in some circumstances.

That is wrong. If the possibility exists, it will be used (at least in
some cases by some people). In many cases this code will have to be
maintained by different people too. There will be guys which can't stand
this kind of identifiers but they are forced to use it. So this
feature renders to a limitation of freedom and productivity of
programmers.

The proposed idea has big drawbacks:
 - code gets unreadable and unmaintainable (eye-ball search for mating
   '' chars, finding seperations between identifiers)
 - the linker doesn't support special chars inside variable names so
   automatic name manging would be necessary
 - people are stimulated to use identifiers in their natural language
   instead of short and pregnant keywords
 - somebody could have the idea to demand Unicode characters inside
   identifiers, cooperative software development (as widely exercised in
   Open Source and Free Software development) across different countries
   and languages comes to a stagnation due to lack of available
   characters on the programmer's keyboards (or could you write German
   äöüÄÖÜß, or even Russian cyrillic letters without painful tricks?)
 - create heavy incompatibilities with Delphi, Turbo Pascal, ...
 - and finally, a personal argument: The professional programming
   language Pascal is shifted towards kiddies and wannabe programmers
   and I personally want to prevent that FreePascal resembles Visual
   Basic or other language for blowhards.

For your game maker application (which is intended for kiddies and
wannabies, I guess), do the name mangling in your application and let
the compiler and underlying language be a tool for professionals.

Bye
  Hansi


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi

It doesn't look like joke anymore, so I ask: in what aspect (except
double double quotes) the space sign is different from the underline sign?


In most cases when we write codes by hand, I know this feature is almost 
useless. But for automated or generated codes like example I had given in 
another email, this feature will help alot.



And if it is, why don't use arbitrary length names with carriage returns,
pictures, music and videos: just use url as the name... (fast
connection required for compiling)


You don't need to hyperbola my suggestion. Everybody knows we don't need those 
inside an identifier name, those are not even a name by the way. Name is a text, 
and most people (except programmers) can't understand why a space char can't be 
accepted as part of a name.


This is just a suggestion anyway, it means can be accepted or rejected. I can 
accept any conclusion/decision from the FPC core development team. So, you don't 
need to over-react your responds. Just give your reasonable arguments, no matter 
you're agree or disagree with me. :)


-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Christian Iversen
On Saturday 25 March 2006 11:19, Bisma Jayadi wrote:
  Foo a.bar a := baz b[4].foo q

 You made a very excessive example. Of course we don't HAVE TO use space
 char all the times. I won't use it that way either. But it's there when we
 really want/need it.

Can you please make an example where we _need_ it? :-)

  is harder to read! It's not the char itself, it's that it's used all over
  the place whenever this is used. I don't like it.

 Maybe you don't like it and that's alright. This feature won't harm you in
 any ways. But some other people could demand it in some circumstances.

That's not true. I have to work with the code other people produce, and this 
is a huge step towards making that code potentially unreadable. 

-- 
Regards,
Christian Iversen
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Jonas Maebe


On 25 Mar 2006, at 11:39, Johann Glaser wrote:


 - people are stimulated to use identifiers in their natural language
   instead of short and pregnant keywords
 - somebody could have the idea to demand Unicode characters inside
   identifiers, cooperative software development (as widely  
exercised in
   Open Source and Free Software development) across different  
countries

   and languages comes to a stagnation due to lack of available
   characters on the programmer's keyboards (or could you write German
   äöüÄÖÜß, or even Russian cyrillic letters without painful  
tricks?)


I think it would be useful to allow this (although I don't see myself  
implementing support for it). Especially in educational contexts,  
where the users don't necessarily know English (yet), this provides  
much added value. Also in projects where not everyone speaks English  
but e.g. Spanish, French or even Chinese, this can be very useful.


Currently, they also name their variables and procedures in their  
native languages, just without accents etc (and that's possibly even  
less readable for a non-native speaker than in case the names would  
be syntactically correct -- e.g. in Polish you have the l and the ł,  
but in identifier names that all becomes l and you can guess which is  
the correct character if you don't know the word).



 - create heavy incompatibilities with Delphi, Turbo Pascal, ...


FPC already supports plenty of things which are quite incompatible  
with Delphi and TP.



 - and finally, a personal argument: The professional programming
   language Pascal is shifted towards kiddies and wannabe programmers
   and I personally want to prevent that FreePascal resembles Visual
   Basic or other language for blowhards.


I don't see at all how identifier naming has anything to do with the  
professionalism of a language. You have wannabe programmers in  
pretty much every language out there (except maybe in languages like  
BrainF*ck and Whitespace), and when I started with Pascal I was a  
kiddie too (13-14 years).



Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Bisma Jayadi

That is wrong. If the possibility exists, it will be used (at least in
some cases by some people). In many cases this code will have to be
maintained by different people too. There will be guys which can't stand
this kind of identifiers but they are forced to use it. So this
feature renders to a limitation of freedom and productivity of
programmers.


I believe the possibility does always exist, since some language does allow it. 
But not in very much demanded though.



The proposed idea has big drawbacks:
 - code gets unreadable and unmaintainable (eye-ball search for mating
   '' chars, finding seperations between identifiers)
 - the linker doesn't support special chars inside variable names so
   automatic name manging would be necessary
 - people are stimulated to use identifiers in their natural language
   instead of short and pregnant keywords
 - somebody could have the idea to demand Unicode characters inside
   identifiers, cooperative software development (as widely exercised in
   Open Source and Free Software development) across different countries
   and languages comes to a stagnation due to lack of available
   characters on the programmer's keyboards (or could you write German
   äöüÄÖÜß, or even Russian cyrillic letters without painful tricks?)
 - create heavy incompatibilities with Delphi, Turbo Pascal, ...


Very good reasonable points! I never think about these drawbacks before, 
especially about the incompatibility issue. Compatibility is one point I like 
from FPC so I still able to compile my codes in other pascal compilers. :) I 
agree with you, my suggestion has lots more disadvantages than the advantages.


Thank you. :)

  - and finally, a personal argument: The professional programming
language Pascal is shifted towards kiddies and wannabe programmers
and I personally want to prevent that FreePascal resembles Visual
Basic or other language for blowhards.

I don't agree with this. But I don't need to discuss more about this since it'd 
be out of the topic. :)


-Bee-

has Bee.ography at
http://beeography.wordpress.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Danny Milosavljevic
Hi,

Am Samstag, den 25.03.2006, 16:50 +0700 schrieb Bisma Jayadi:
  WWWHHH! *Falls off chair*
  *grabs desk* *pulls up*
  Clear enough ? ;-)
 
 Same respond when the first time I knew that file name is case-sensitive in 
 un*x-like OSes (Linux, etc). It looks silly and ridicilous (especially for M$ 
 users), but most people still use it (the users like it even more). :P

Who likes that? I thought it was just for POSIX compability and that
every single app works around it anyways so user doesn't have to cope
with that :- (i.e. bash's ignore-case, filedialogs that couldn't care
less about case, )

If a filesystem type appears with case-insensitive names, I'm the first
one to switch my home directory to it, non-standard or not...

The only reason file names are case sensitive on UNIX is because those
deluded souls don't even want the OS/anyone to know what charset
encoding the file names *are* in. It's been basically guesswork to find
out. Once the OS isn't supposed to know the encoding of it's own
names, it just goes downwards from there.
That's changing nowadays since most UNIXes are switching the filesystem
name encoding to UTF-8. The standard still demands OS stupidity though.


And about spaces in identififers, that makes the code unreadable (i's a
problem for the eye). SQL has it too, and there it makes the code
unreadable as well. If you can, try using them in MSAccess or MSSQL
Server and later try to read some complex SQL query that uses them. It's
the height of unreadability.

That's what underscores are for: spaces in identifiers (or - in some
programming languages).

And if your argument is that they don't have to be used by everyone /
everywhere, then I say that's even worse: having no clear naming
conventions hurts maintainability and frustrates everyone.

As you can see I'm in favour of (bondage and) discipline :)

cheers,
  Danny


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Michael Van Canneyt


On Sat, 25 Mar 2006, Bisma Jayadi wrote:

  I cannot imagine situations where it would be required or demanded
  (maybe desirable, but I don't so). In what cases would it be required or
  demanded?

 Say I'm gonna make some kind of game maker application, where user can create
 game objects. It sure the game objects need name as their identifier. For ease
 of use, I can make object's name more space-char-friendly because the user of
 the application is not always a programmer (they even can't understand why an
 object's name can't accept space char).

In that case code a 'Name' property. The class will have a reagular identifier,
but the name property can contain anything you need.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] space char inside identifier's name

2006-03-25 Thread Danny Milosavljevic
Hi,

Am Samstag, den 25.03.2006, 09:24 -0300 schrieb Felipe Monteiro de
Carvalho:
 Hello,
 
 By the way, how do other languages deal with identifiers on languages
 other then english?

C: unsupported
python: unsupported
perl: unsupported
common lisp:  supports _anything_ as a name :)
ruby: supported with -K option
C#: unsupported
Java: unicode support
SQL: sometimes supported
Fortran77: only ascii letters and digits 

cheers,
  Danny


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel