Live data from Hacker News

Picat – a logic-based multi-paradigm programming language

picat-lang.org

1–10 of 39 posts

Re: Picat – a logic-based multi-paradigm programming language

#4

Really bad idea... please no imperative

Why not?

Edit: functional is a tool, declarative is a tool, imperative is a tool. There's nothing wrong with any of them, it's whether they're applied correctly that makes them good or bad. They're just tools. Imperative can be the right one sometimes.

Re: Picat – a logic-based multi-paradigm programming language

#6
Congratulations for the code examples on the home page. Not every language designer does that. Plenty of examples on HN.

My only criticism is about dots and commas, and I know where they come from. Especially as

> Picat, as a scripting language, is as powerful as Python and Ruby.

But I'm not adding commas and dots to the end of each line, it's a little nightmare. I'm staying with Python and Ruby for scripting.

Is there really no way for logic programming languages to skip commas and dots or is it only a tradition?

Re: Picat – a logic-based multi-paradigm programming language

#7
post #6

Congratulations for the code examples on the home page. Not every language designer does that. Plenty of examples on HN. My only criticism is about dots and commas, and I know where they come from. Especially as > Picat, as a scripting language, is as powerful as Python and Ruby. But I'm not adding commas and dots to the end of each line, it's a little nightmare. I'm staying with Python and Ruby for scripting. Is the…

The commas and dots are operators, not syntax.

one, two, three.

Is essentially compiled down to:

if (one && two && three) { return three; }

Whereas

one, two, three;

one, four.

compiles down to:

if (one && two && three) { return three; } else if (one && four) { return four; }

So yeah, it's not syntax.

, === &&

; === ||

. marks end of a condition, so } in C.

Re: Picat – a logic-based multi-paradigm programming language

#9
post #7
post #6

Congratulations for the code examples on the home page. Not every language designer does that. Plenty of examples on HN. My only criticism is about dots and commas, and I know where they come from. Especially as > Picat, as a scripting language, is as powerful as Python and Ruby. But I'm not adding commas and dots to the end of each line, it's a little nightmare. I'm staying with Python and Ruby for scripting. Is the…

The commas and dots are operators, not syntax. one, two, three. Is essentially compiled down to: if (one && two && three) { return three; } Whereas one, two, three; one, four. compiles down to: if (one && two && three) { return three; } else if (one && four) { return four; } So yeah, it's not syntax. , === && ; === || . marks end of a condition, so } in C.

The issue I see is that a . and a , are tiny little marks on the screen that are super easy to miss and, at a glance, the . , ; all can look the same. Maybe with practice you can spot the differences easier, but certainly as a newcomer to the language its a lot of extra cognitive load. && and || at least are super obvious.
Post reply on HN