Opened 16 years ago
Last modified 8 years ago
#246 new enhancement
s() and t() as an alias for source() and target()
Reported by: | Peter Kovacs | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.5 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
As we have u()
and v()
for undirected graphs, it seems to be a good idea to have shorter alias names for source()
and target()
, e.g. s()
and t()
, since they are among the most frequently used functions.
What do you think about it?
Change History (6)
comment:1 follow-up: 2 Changed 16 years ago by
comment:2 follow-up: 3 Changed 16 years ago by
Replying to alpar:
I'm definitely in favor of it, but I'm also sure that not everybody shares this opinion.
That's why it is good to have this ticket. :) Everyone can write his/her comments here. However if nobody protests against it, we could introduce these names. As an alias, of course, since we can't break the API of release 1.0.
I would also be very happy to be able to write
for(NodeIt n(g);n;++n)
instead of
for(NodeIt n(g);n!=INVALID;++n)
I have never undertood why don't we support this form. I thought about implmenetation difficulties.
This line probably appears even more frequently than
source()
, but I noticed high resistance when I proposed it.
What were the reasons of who didn't like it? Could you remember? Are those reasons still relevant, even if the proposed syntax would be just an alternative?
comment:3 follow-up: 4 Changed 16 years ago by
Replying to kpeter:
What were the reasons of who didn't like it? Could you remember? Are those reasons still relevant, even if the proposed syntax would be just an alternative?
The argument against it was rather emotional than technical, and IMHO it has never been relevant.
comment:4 Changed 15 years ago by
Milestone: | LEMON 1.2 release → LEMON 1.3 release |
---|
comment:5 Changed 12 years ago by
Milestone: | LEMON 1.3 release → LEMON 1.4 release |
---|---|
Owner: | changed from Peter Kovacs to Alpar Juttner |
comment:6 Changed 8 years ago by
Milestone: | LEMON 1.4 release → LEMON 1.5 release |
---|
Replying to kpeter:
I'm definitely in favor of it, but I'm also sure that not everybody shares this opinion.
I would also be very happy to be able to write
instead of
This line probably appears even more frequently than
source()
, but I noticed high resistance when I proposed it.