HPM / New Interfaces : pc.c/map.c/timer.c/party.c

Ind

Development Administrator
Staff member
Messages
1,655
Points
113
First I once again would like to thank Susu for doing this pull request, its been of great help (as was his previous one).

Second, if you don't work on the source you can skip this, it wont mind you later.

Now, as you may know these interfaces (and the others existent prior to them) were/are-being made because of two things.

up to this point we've always considered:

  • Making their names as short as possible, while trying to maintain its name as similar as possible to its previous stuff
The current interfaces are the following

  • Common

  • console
  • DB
  • SQL
  • strlib
  • sv
  • StrBuf (StringBuf)
  • iTimer

[*]Map Server

  • atcommand
  • battle
  • buyingstore
  • clif
  • guild
  • homunculus
  • ircbot
  • log
  • iMap
  • party
  • pc
  • script
  • searchstore
  • skill
  • vending

[*]Char Server

  • pincode



We've had no problem with their names up to now, on map.c's interface it wasn't possible to change it to 'map' because 'map' is already in use by the 'map[]' array of maps, Susu (in his pull request) created the map.c interface and named it iMap to avoid the conflict, another is timer.c's interface, its not possible to name it 'timer' because 'timer' is a existent function on some unix distros, and it'd conflict on them (and make it not compilable), Susu (in his pull request) created the timer.c interface and has gone around this by naming it 'iTimer'.

While this topic is a notification on why the names differ, it is also a opportunity for you to point-out (and/or discuss) any comments or modifications on the interface names

Worry not

if we come to decide to change any of the interface names, it will hardly be a bother. a single 'Old->' => 'New->' case-sensitive find&replace will take care of it in a couple of seconds.

 
Last edited by a moderator:
for iTimer I would suggest timerintf, and for iMap, mapi or mapintf.

 
Actually, renaming the entire interface system to i<Whatever> seems a really good idea, in order to maintain consistency and reduce the difference. 

In general for anyone who comes fresh new, learning that the interface system renames all the previous functions to iPrefix might be easier to adapt to, however I believe all the interface system should be renamed accordingly to whatever comes into this.

As for mkbu's comment when I first read it I thought it was referencing to inter functions or those *if* functions (chrif, intif), which might lead to a small confusion (which iPrefix wouldn't). 

On a side note and as a personal remark, I hate the lower i and the first capped character afterwards, feels too much like Apple stuff and that's way too mainstream for us
default_biggrin.png
(But as stated previously, anything saying "if" or "int" or similar could cause some confusion, so I don't think it'd be a really good idea)

 
Yes, the reason why i don't like iName is because we would be sued by Apple.

But yeah, I thought about chrif and intif, but I don't know any other abbreviations for interface.

 
Why not use h as your prefix? 'H' stands for Hercules
default_biggrin.png
so your interface name would be hMap or hTimer. Or we can also use hpmMap or hpmTimer. Just a suggestion
default_ani_meow.gif


 
I spend so many times trying to figure what the  "if" in "chrif" means xD. Thx to you mkbu95, now I know it's stands for "interface"
default_tongue.png
.

Back on topic, most of the languages uses the "i" as a prefix for the interface, that's why I chose this in the first place, but he "h" prefix sounds good to
default_smile.png
.

 
Back
Top