Recent

Author Topic: "New units naming style"  (Read 3729 times)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
"New units naming style"
« on: December 21, 2018, 07:00:37 pm »
I was reading this thread and I saw that fancy new naming style used by the generics library (this).  I saw it also in latest Delphi versions but I'm not used to it.

How does it work?  Does it work with FPC compilers older than 3.0?  It seems nice to be used by my some of my own libraries...
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Handoko

  • Hero Member
  • *****
  • Posts: 5159
  • My goal: build my own game engine using Lazarus
Re: "New units naming style"
« Reply #1 on: December 21, 2018, 07:06:36 pm »

CCRDude

  • Hero Member
  • *****
  • Posts: 600
Re: "New units naming style"
« Reply #2 on: December 21, 2018, 10:42:22 pm »
The IDE is still a bit buggy about it though. If I work on a LCL project, add a new unit, save it with dots in its filename, the project.lpr will not rename the "unit1" that was added when adding the new unit to the actual name. I think I've reported this to the bugtracker a year ago or so...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11459
  • FPC developer.
Re: "New units naming style"
« Reply #3 on: December 21, 2018, 11:13:20 pm »
Note that only 3.2 and 3.3.1 have the parameter to set default namespaces. Afaik 3.0 can only use dotted units canonically

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: "New units naming style"
« Reply #4 on: December 24, 2018, 11:20:36 am »
Ok, thanks.  May be I'll not add this to Allegro.pas yet.   May be on version 6?
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11459
  • FPC developer.
Re: "New units naming style"
« Reply #5 on: December 24, 2018, 07:06:49 pm »
Ok, thanks.  May be I'll not add this to Allegro.pas yet.   May be on version 6?

Do you use unitnames that are very common that could cause conflicts ? If not, it only complicates, and I see no reason to do this. If you do users must add parameters to make the unitnames of managable length again, without any benefit.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: "New units naming style"
« Reply #6 on: December 26, 2018, 11:17:06 am »
Thanks for the advice.  :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018