[Newbies] method naming advice
Mark Volkmann
mark at ociweb.com
Fri Sep 26 19:49:37 UTC 2008
On Sep 26, 2008, at 2:42 PM, John McKeon wrote:
> One newbie to another - YES LOL Just kidding
>
> If it were me.....I would look for something already in Squeak -
> like XMLElement in the XML-Parser category - and either use it
> straight out of the box or subclass it. (Notice it already has
> attributeAt: attributeName put: attributeValue)
The reason I don't want to do that is that I'm porting a library I
wrote to Smalltalk. I've already implemented it in Java and Ruby.
Other people are working on Perl, C# and JavaScript implementations.
If you're interested, you can read about it at http://www.ociweb.com/
wax.
I'm not necessarily expecting that the Smalltalk world will gravitate
toward using my library. For now I'm doing it mainly for the learning
experience.
> Just my two cents.
>
> Mark Volkmann wrote:
>> I hope I'm not exceeding the limit for questions in one day.
>>
>> I'm porting some Java code that deals with XML to Smalltalk. A Java
>> class has these methods.
>>
>> public StartTagWAX attr(String name, Object value) ...
>> public StartTagWAX attr(String prefix, String name, Object
>> value) ...
>>
>> What would be good Smalltalk names for these methods?
>> Here's my first guess.
>>
>> attrName:value:
>> attrPrefix:name:value:
>>
>> Note that I don't really have a new to create Attr objects. I just
>> need data describing an attribute so I can output it.
>>
>> ---
>> Mark Volkmann
>>
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
---
Mark Volkmann
More information about the Beginners
mailing list