# \[Parser\] Allow comma between struct fields and at the end of exported object list

**URL:** <https://discourse.julialang.org/t/parser-allow-comma-between-struct-fields-and-at-the-end-of-exported-object-list/84049>\
**Category:** Internals & Design\
**Created:** [July 11, 2022, 1:26pm UTC](https://discourse.julialang.org/t/parser-allow-comma-between-struct-fields-and-at-the-end-of-exported-object-list/84049 "2022-07-11T13:26:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [July 11, 2022, 1:26pm UTC](https://discourse.julialang.org/t/parser-allow-comma-between-struct-fields-and-at-the-end-of-exported-object-list/84049/1 "2022-07-11T13:26:52Z")

</div>

I have a cup of minor issues that bother me from time to time.

The first one is that it is currently an error to have a comma between struct fields, e.g. this is an error:

```julia
struct Foo
    a::Int64,
    b::Int64
end

```

The error message is often very unclear and weird enough, the Struct is then actually compiled but without fields (i.e. you need to restart Julia to get rid of the error).  
Is there any reason not to allow a comma after struct members? Would it be complex to implement it ? would it lead to ambiguous code ?

The second thing that bothers me (a bit) is that often a comma separated list of items can not end with a comma. For example, this is another error:

```julia
module Goo
export a,

a(x) = x
end

```

Again, 99% this is to avoid some ambiguous code… but maybe 1% this would not generate any ambiguity and would make coders happier 🙂 🙂 🙂
