Re:An Introduction to C and GUI Programming
by sureaboutthis on Thursday April 25, 2019 @09:57AM
(#19748135)
My point is, that in C, you can do anything, including creating closures and passing them however you wish.
[ Parent
| on HN ]
Re:An Introduction to C and GUI Programming
by icedchai on Thursday April 25, 2019 @11:32AM
(#19749185)
With enough coding, you can "do anything" in any Turing complete language. This is meaningless. It doesn't mean it is advisable (simple, maintainable) to do so. C does not support a syntax for closures, so you'll really just be calling functions with an 'environment' arg or something similar. What's the point?
Re:An Introduction to C and GUI Programming
by sureaboutthis on Friday April 26, 2019 @12:22AM
(#19754855)
My point is that he claims C can't do closures or pass them either. Follow the thread.
As far as being turing complete, CSS is supposedly that, also, so good luck with that.
Re:An Introduction to C and GUI Programming
by icedchai on Friday April 26, 2019 @10:36AM
(#19757954)
When people say a language supports closures, they are generally talking about syntax. C does not support a convenient syntax for closures, period.
Here's a guy who developed a closure "library" for C: https://nullprogram.com/blog/2017/01/08/
It's clever, but he actually had to resort to assembly...