Jump to content
Joshua Gardner

pasfmt out now!

Recommended Posts

Just now, Jonah Jeleniewski said:

You should write a blog post on how you architected your tool

Don't worry, there will be lots of documentation.
- And I might even be generous enough to open source it.

I would, however, strongly recommend rewriting pasfmt in a more sane language sooner rather than later.
 

  • Like 2

Share this post


Link to post
9 hours ago, Glenn Dufke said:

Great idea crumbled by rust.

Hey, we have AI nowadays to solve that problem: Just tell it to convert the rust code to Object Pascal and be done. And if the first one does not succeed, try others.

  • Haha 1

Share this post


Link to post
6 hours ago, Dave Nottage said:

None of them have a: "Don't touch my assignment alignments" option? 🙂

 

If only there was a code formatter written in Delphi that is open source!

  • Haha 4

Share this post


Link to post
7 hours ago, Vincent Parrett said:

An opinionated formatter that doesn't allow me to configure to my taste is unfortunately not going to cut it.

Been thinking about writing exactly the same. I worked with quite a lot of developers falling in this category, too.

Share this post


Link to post
8 hours ago, pyscripter said:

Spring4D in particular uses camelCasing for parameters and local variables, small f for fields and uses Pascal casing for function/procedure names and properties.

 

@Stefan Glienke Is this just a matter of taste?

It always is just a matter of taste - I don't particularly like the parameter and local variable prefixing so I mostly settled on the C# naming conventions for those - I did not want to go that far to name fields with a leading underscore like them though.

Though this is not without disadvantages - I had cases where I had a count parameter and wanted to access the Count field but without qualifying with Self I accessed the parameter instead. :classic_blush: (those are the days where I wished for case sensitivity)

54 minutes ago, dummzeuch said:

If only there was a code formatter written in Delphi that is open source!

Because being open source means that everyone can go ahead and modify it to their liking, right? :classic_dry:

Edited by Stefan Glienke

Share this post


Link to post
1 hour ago, Stefan Glienke said:
2 hours ago, dummzeuch said:

If only there was a code formatter written in Delphi that is open source!

Because being open source means that everyone can go ahead and modify it to their liking, right? :classic_dry:

Of course. Nothing prevents anybody from doing that, as long as the license conditions are observed. And even the most restrictive open source licenses that I know, allow private use of the code without restrictions.

 

The project maintainer might not like those changes, but you can always have your very own personal fork of the code.

 

(The particular project maintainer you are probably thinking about would of course prefer getting a patch that adds this as a configurable option and does not break the code and its compatibility to older Delphi versions..)

Edited by dummzeuch

Share this post


Link to post
2 hours ago, dummzeuch said:

If only there was a code formatter written in Delphi that is open source!

There is no need for that anymore. Train an AI for your coding style then you can use it as a free code formatter.

Share this post


Link to post
Just now, Lajos Juhász said:

There is no need for that anymore. Train an AI for your coding style then you can use it as a free code formatter.

Interesting idea. I might just try that. "format the following code according to the coding style used in this other unit"

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×