Jump to content
Ind

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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 :D (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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

hpm prefix sounds good to me :)

I think HPM stands for Hercules Plugin Manager

 

what about herc?

 

but i think h is already good enough

Share this post


Link to post
Share on other sites

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" :P.

 

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 :).

Share this post


Link to post
Share on other sites

 

hpm prefix sounds good to me :)

I think HPM stands for Hercules Plugin Manager

 

what about herc?

 

but i think h is already good enough

 

Yes hpm stands for Hercules Plugin Manager. Prefix as hpm or h you guys will decide it :meow:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.