Live data from Hacker News

Anyprint: use any language's print statements in Python

github.com

31–40 of 76 posts

Re: Anyprint: use any language's print statements in Python

#31
post #23

Ironically, what I miss most from Python is Python2's print, which for a language proud of getting rid of parenthesis, that is very contradictory....

Perhaps you'd enjoy Nim which supports both. echo "hello world" echo("hello world") and as a bonus, also the following: "hello world".echo

>"hello world".echo

Okay I have to admit I love this one.

Re: Anyprint: use any language's print statements in Python

#33
post #23

Earlier quoted context omitted.

Perhaps you'd enjoy Nim which supports both. echo "hello world" echo("hello world") and as a bonus, also the following: "hello world".echo

I'm a primarily Python dev, have been for a long time. Lately I've been working in Javascript/typescript and there is no worse antifeature than having 3 different ways of doing the same thing. You try to figure out how to do something, you see 3 different solutions and you ask yourself, what's the difference? What's more correct? Will I need one over the other? Are they compatible? Is one way better supported than th…

As a primary js developer (about 10 years) who in the most recent two years has done more and more es6 work I will revel in the day I don't have to use it in my day to day. I toy with clojure in my free time and even python and just hate the way the JavaScript language has been taken over not just by trends but with what I think are poorly thought out syntax additions. JavaScript seems like a language that has no opinion on the best way to do a thing, no well thought out constructs to eliminate boilerplate, and just sits there and waits for a Bower, and mom, a lodash, or a Babel to come along and tell it hoe to be a proper language.

Re: Anyprint: use any language's print statements in Python

#34
post #20

Ironically, what I miss most from Python is Python2's print, which for a language proud of getting rid of parenthesis, that is very contradictory....

Same here. I will probably keep using Python 2 for as long as it works... simply because I don't have to type those parentheses.

Here's a nickel kid, buy yourself a decent editor. ;) Mine has snippets:

    pr  --->  print('%cursor%', %cursor%)

Re: Anyprint: use any language's print statements in Python

#35
post #23

Earlier quoted context omitted.

Perhaps you'd enjoy Nim which supports both. echo "hello world" echo("hello world") and as a bonus, also the following: "hello world".echo

I'm a primarily Python dev, have been for a long time. Lately I've been working in Javascript/typescript and there is no worse antifeature than having 3 different ways of doing the same thing. You try to figure out how to do something, you see 3 different solutions and you ask yourself, what's the difference? What's more correct? Will I need one over the other? Are they compatible? Is one way better supported than th…

I feel you on the JS/TS front, but to be honest it's somehow less of an issue in Nim. Not sure why, but everyone does really follow some pretty simple conventions.

Re: Anyprint: use any language's print statements in Python

#36
post #26
post #21

Earlier quoted context omitted.

As someone most at home in lisps--there's just no accounting for taste ;)

Is there a LISP with significant white space in place of parentheses? Our two groups could be united by the disgust of the rest of the programming community.

The Arc language wiki has this list of languages that make use of significant whitespace.

https://sites.google.com/site/arclanguagewiki/more/list-of-l...

Re: Anyprint: use any language's print statements in Python

#37

Let's hope they also add (format t "hello ~a!" name) for completeness...

To say nothing of vitally important format expressions like (format t "~{~a~^, ~}" list)

And of course the stuff necessary for word-wrap-in-`format`:

    (format t "~{~ ~}"
      '("these" "words" "will" "be" "wrapped" "to" "40" "characters"))
and the other `format` insanity in: http://cybertiggyr.com/fmt/fmt.pdf

Re: Anyprint: use any language's print statements in Python

#39

Ironically, what I miss most from Python is Python2's print, which for a language proud of getting rid of parenthesis, that is very contradictory....

print chevron in python2 is super awesome

    print 'hello'
    f = open(file, 'w')
    print>>f, 'world'
It just feels more "powerful" than Py3k's

    print(somestring, file=someopenfile)
Post reply on HN