amiga.org
     
iconAll times are GMT -6. The time now is 02:46 PM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga News and Community Announcements » Amiga Programming and Development » All you want to know about taglists

Amiga Programming and Development This is the news feed forum for all Amiga programming and development news items and announcements.

Reply
 
Thread Tools Display Modes
Old 10-26-2011, 01:04 PM   #1
Krashan
Technoid
Points: 8,420, Level: 61 Points: 8,420, Level: 61 Points: 8,420, Level: 61
Activity: 1% Activity: 1% Activity: 1%
 
Krashan's Avatar
 
Join Date: Jan 2003
Location: Białystok, Poland
Posts: 203
Post All you want to know about taglists

In the series about MorphOS basics in the MorphZone Library, I've written an extensive article about taglists, one of main concepts of the AmigaOS (and its derivatives) API. Taglists were introduced in AmigaOS 2 and are present in almost unchanged form in MorphOS, AmigaOS 4 and also AROS, so it may be an interesting reading for developers working will all these systems.
__________________
Homepage · MorphOS Files · DigiBooster 3
Krashan is offline   Reply With Quote
Old 10-27-2011, 08:18 AM   #2
JJ
Lifetime Member
Points: 19,023, Level: 87 Points: 19,023, Level: 87 Points: 19,023, Level: 87
Activity: 7% Activity: 7% Activity: 7%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,584
Default Re: All you want to know about taglists

Interesting read. Is the main advantage of tag lists that their are functions for dealing with them as opposed to a normal array of key values ?
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 2.7 user
JJ is offline   Reply With Quote
Old 10-27-2011, 09:25 AM   #3
ChaosLord
Premium Member
Points: 14,695, Level: 78 Points: 14,695, Level: 78 Points: 14,695, Level: 78
Activity: 28% Activity: 28% Activity: 28%
 
ChaosLord's Avatar
 
Join Date: Nov 2003
Location: Houston, Texas
Posts: 2,257
Default Re: All you want to know about taglists

Very nice article! Krashan FTW!
__________________
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
ChaosLord is offline   Reply With Quote
Old 10-27-2011, 12:44 PM   #4
Piru
' union select name,pwd--
Points: 30,457, Level: 100 Points: 30,457, Level: 100 Points: 30,457, Level: 100
Activity: 69% Activity: 69% Activity: 69%
 
Piru's Avatar
 
Join Date: Aug 2002
Location: Helsinki, Finland
Posts: 6,946
Default Re: All you want to know about taglists

Quote:
Originally Posted by JJ View Post
Interesting read. Is the main advantage of tag lists that their are functions for dealing with them as opposed to a normal array of key values ?
The most benefit comes when tag lists are used to pass arguments to API functions: It's easy to add new functionality or parameters to existing functions, without breaking backward compatibility. Even if a newer implementation knows about new tags it doesn't interfere with old apps calling the function and only using the older tags.
Piru is offline   Reply With Quote
Old 10-27-2011, 04:36 PM   #5
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: All you want to know about taglists

Quote:
Originally Posted by Piru View Post
The most benefit comes when tag lists are used to pass arguments to API functions: It's easy to add new functionality or parameters to existing functions, without breaking backward compatibility. Even if a newer implementation knows about new tags it doesn't interfere with old apps calling the function and only using the older tags.
Also, there are probably performance benefits over... well, what other semantics could you use? Variadic function calls are one possibility in C at least. Considering that the TagItem array can be constructed in a number of ways and can be allocated in more than one storage type (ie, not just "on the stack"), then passing a struct TagItem * pointer to your function beats pushing a long list of temporary variables onto the stack that are then popped off again - especially if the function being called makes calls to other functions internally that might use the same TagItem set (or at least deals with a subset of them).

Having said that, in a lot of use cases, the TagItem array will only be a small collection and allocated on the stack regardless.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2011, 04:22 AM   #6
JJ
Lifetime Member
Points: 19,023, Level: 87 Points: 19,023, Level: 87 Points: 19,023, Level: 87
Activity: 7% Activity: 7% Activity: 7%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,584
Default Re: All you want to know about taglists

Thanks for the replies all
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 2.7 user
JJ is offline   Reply With Quote
Reply

Bookmarks

Tags
taglists
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump