Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: List cons functor (was Re: The meaning of module overriding syntax mod:goal in different Prologs
On 2005-03-03, Brian Hulley <brianh@metamilk.com> wrote:
> A change is an opportunity!

Changes in software standards are a nightmare.  Actually many changes are
mostly a nightmare.  I agree not a lot of code will be broken, but most
textbooks will be incorrect and code using functor/2 or =.. on lists will
break.  Addressing ./2 from foreign code is generally not necessary, but
not completely uncommon.

There is something to say for making sure we can use . as an infix
operator. Actually we can, but we have to be uncomfortably careful with
whitespace. Using the convention that . terminates a clause only if
followed by a newline is an option.  This too will break code:

foo(bar). gnu(gnat).

is suddenly read completely different!  Its not in my code, but I've
seen this too often.

It also breaks some nice goodies like validating a clause in an editor
as a . is typed (already broken by floating point numbers, but this way
it gets worse).

Otherwise, if . is an infix operator, there is no problem using it for
modules.  <Module>:XYZ now requires <Module> to be an atom.  Seeing a
list there is not ambiguous:

:- module(foo.bar, ...).

..,
foo.bar:hello,
..,

all make perfect sense, also with lists using .(a,b).

--- Jan

Report this thread to moderator Post Follow-up to this message
Old Post
Jan Wielemaker
03-04-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:20 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.