salmanahmad / dog

The Dog Programming Language
http://www.dog-lang.org
Apache License 2.0
0 stars 0 forks source link

Print Line Function #58

Closed salmanahmad closed 11 years ago

salmanahmad commented 11 years ago

Making dog.print: NOT include a newline at the end. Adding a dog.println: function to do that instead. What do we think about those names? Alternatives:

Thoughts?

ef4 commented 11 years ago

(Anything is better than Python's trailing comma syntax.)

We don't expect dog to be used for building console programs, so why not put the focus on "logging" from the beginning?

dog.log: "This happened"
salmanahmad commented 11 years ago

@ef4, not a bad idea. Can we imagine a use for a standardized set of logging functions, or is this over engineering...

dog.warn: "Warning"
dog.error: "Error"
dog.log: "Message"
ef4 commented 11 years ago

Easy to add those when they're needed.

As long as we're over-engineering, it would be nice if the logging function(s) could access enough of their calling context to know what module they were called from.

That way libraries can log as they want to, and the main program can configure log levels and logline formats per module.

salmanahmad commented 11 years ago

As of now, we have dog.print, dog.println, and console.log. I think this should be sufficient for now. Thoughts?